OpenCores
URL https://opencores.org/ocsvn/uart_observer/uart_observer/trunk

Subversion Repositories uart_observer

[/] [uart_observer/] [trunk/] [verilog/] [uart_observer_demonstrator.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 audriusa
/**
2 4 audriusa
* Demonstrates the functionality of the UART observer. Reads 64 bits from the terminal keyboard.
3 3 audriusa
*/
4
module uart_observer_demonstrator (
5
  input USB_UART_TX_FPGA_RX_LS,
6
  input USB_UART_CTS_I_B_LS,
7
  input CLK_I,
8
 
9
  input GPIO_SW_E,
10
  input GPIO_SW_W,
11
  input GPIO_SW_S,
12
  input GPIO_SW_N,
13
  input GPIO_SW_C,
14
 
15
  input GPIO_DIP_SW0,
16
  input GPIO_DIP_SW1,
17
  input GPIO_DIP_SW2,
18
  input GPIO_DIP_SW3,
19
 
20
  output GPIO_LED_0,
21
  output GPIO_LED_1,
22
  output GPIO_LED_2,
23
  output GPIO_LED_3,
24
  output GPIO_LED_4,
25
  output GPIO_LED_5,
26
  output GPIO_LED_6,
27
  output GPIO_LED_7,
28
 
29
  output USB_UART_RX_FPGA_TX_LS,
30
  output USB_UART_RTS_O_B_LS
31
);
32
 
33 4 audriusa
 // 32 bits we observe.
34
 wire [31:0] observables;
35
 
36
 uart_receiver #(.CLOCK_FREQ (90_000_000), .BAUDS(921600), .BITS(32) )
37
 UR(
38
  // Clock
39
  .CLK_I(CLK_I),
40 3 audriusa
 
41 4 audriusa
  // Values to observer
42
  .DAT_O(observables),
43
 
44
  // UART
45
  .RXD(USB_UART_TX_FPGA_RX_LS), // data  
46
  .CTR(USB_UART_CTS_I_B_LS)     // clear to receive
47
 );
48 3 audriusa
 
49 4 audriusa
 uart_observer #(.CLOCK_FREQ (90_000_000), .BAUDS(921600), .BITS(32) )
50 3 audriusa
 U0(
51
  // Clock
52
  .CLK_I(CLK_I),
53
 
54
  // Values to observer
55
  .DAT_I(observables),
56
 
57
  // UART
58
  .TXD(USB_UART_RX_FPGA_TX_LS), // data  
59
  .RTS(USB_UART_RTS_O_B_LS),    // request to send
60 4 audriusa
  .CTS(USB_UART_CTS_I_B_LS)     // clear to send
61 3 audriusa
 
62
 );
63
 
64
 assign GPIO_LED_0 = observables[0];
65
 assign GPIO_LED_1 = observables[1];
66
 assign GPIO_LED_2 = observables[2];
67
 assign GPIO_LED_3 = observables[3];
68
 assign GPIO_LED_4 = observables[4];
69
 
70
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.