aboutsummaryrefslogtreecommitdiffstats
path: root/hdl/main_xula2.v
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@leaflabs.com>2013-10-08 23:48:29 -0400
committerbryan newbold <bnewbold@leaflabs.com>2013-10-08 23:48:29 -0400
commit40affb5169e1d30f25a0906acb56f2cbbb74b51f (patch)
tree55988758f3f53c3cf5dc445392a71f864510d459 /hdl/main_xula2.v
parent3b13cb7d690ba1891f008d2905fcfb36049c71ff (diff)
downloadbasic-hdl-template-40affb5169e1d30f25a0906acb56f2cbbb74b51f.tar.gz
basic-hdl-template-40affb5169e1d30f25a0906acb56f2cbbb74b51f.zip
basic rot13 UART demo working
Diffstat (limited to 'hdl/main_xula2.v')
-rw-r--r--hdl/main_xula2.v24
1 files changed, 24 insertions, 0 deletions
diff --git a/hdl/main_xula2.v b/hdl/main_xula2.v
index 926f634..2f0d662 100644
--- a/hdl/main_xula2.v
+++ b/hdl/main_xula2.v
@@ -32,6 +32,30 @@ module main (
reg throb_led = 0;
assign chan[10] = throb_led;
+ wire [7:0] rx_byte;
+ wire [7:0] tx_byte;
+ wire uart_flag;
+ simple_uart simple_uart_inst (
+ .clk(clock_12mhz),
+ .rst(reset),
+ .rx(chan[17]),
+ .tx(chan[18]),
+ .transmit(uart_flag),
+ .tx_byte(tx_byte),
+ .received(uart_flag),
+ .rx_byte(rx_byte),
+ .is_receiving(),
+ .is_transmitting(),
+ .recv_error()
+ );
+
+ rot13 rot13_inst (
+ .clock(clock_12mhz),
+ .reset(reset),
+ .in_char(rx_byte),
+ .out_char(tx_byte)
+ );
+
always @(posedge clock_12mhz) begin
if (reset) begin
throb_counter <= 0;