working towards sim uart-like device support
This commit is contained in:
parent
dc11528567
commit
c3c2cd53e1
6 changed files with 154 additions and 18 deletions
23
src/Core.bsv
Normal file
23
src/Core.bsv
Normal 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
|
Reference in a new issue