sim now working

This commit is contained in:
Yehowshua Immanuel 2023-09-25 20:21:23 -04:00
parent 3be337c4d6
commit dc11528567

View file

@ -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