working towards sim uart-like device support

This commit is contained in:
Yehowshua Immanuel 2023-09-26 00:40:04 -04:00
parent dc11528567
commit c3c2cd53e1
6 changed files with 154 additions and 18 deletions

23
src/Core.bsv Normal file
View file

@ -0,0 +1,23 @@
package Core;
interface Core#(numeric type clkFreq);
method Bit#(8) get_char();
method Bit#(8) get_led();
method Action put_char(Bit#(8) byte_in);
endinterface
module mkCore(Core#(clkFreq));
Wire#(Bit#(8)) uart_out <- mkWire;
method Bit#(8) get_char();
return uart_out;
endmethod
method Bit#(8) get_led();
return uart_out;
endmethod
method Action put_char(Bit#(8) byte_in);
uart_out <= byte_in;
endmethod
endmodule
endpackage