sim now working
This commit is contained in:
parent
3be337c4d6
commit
dc11528567
35
src/Top.bsv
35
src/Top.bsv
|
@ -55,22 +55,23 @@ module mkTop(ITop);
|
||||||
endmethod
|
endmethod
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
// module mkSim(Empty);
|
module mkSim(Empty);
|
||||||
// (actionvalue
|
|
||||||
// Reg#(UInt#(3)) count();
|
// Define a 3-bit register named count
|
||||||
// mkReg#(0) the_count(count);
|
Reg#(UInt#(3)) count <- mkReg(0);
|
||||||
// addRules(rules
|
|
||||||
// rule count (True);
|
// Rule to update and display the count
|
||||||
// count <= unpack({1'b1, (pack(count))[2:1]});
|
rule tick (True);
|
||||||
// ($display)(count);
|
count <= unpack({1'b1, (pack(count))[2:1]});
|
||||||
// endrule: count
|
($display)(count);
|
||||||
// rule end_sim (count == 6);
|
endrule
|
||||||
// ($finish)();
|
|
||||||
// endrule: end_sim
|
// Rule to finish the simulation when count reaches 6
|
||||||
// endrules);
|
rule end_sim (count == 6);
|
||||||
// return(interface Empty
|
($finish)();
|
||||||
// endinterface: Empty);
|
endrule
|
||||||
// endactionvalue);
|
|
||||||
// endmodule: mkSim
|
endmodule
|
||||||
|
|
||||||
|
|
||||||
endpackage
|
endpackage
|
Loading…
Reference in a new issue