L
lei
Guest
Hi all:
I have 2 modules, one display digits on LED, another receives data
from serial port, The LED module has been tested, it can show correct
digit , if I hardcoded a data inside that module in a reg type data.
So I wrote a top level module like this:
module(..)
receiver recv(clk, rx_data...); // receive data from serial port.
led show(clk, rx_data...); //display the data.
endmodule
The result is that if I transfer a character, I can see the LED
flashes, but it's not display correct value, There could be some other
bugs inside the receiver module, but I wonder, since the rx_data is a
net type, the data will not be retained after receive, so it will not
stay inside the LED module? (the rx_data has been declared as reg type
inside the LED module though).
How do I solve this problem?
Thanks
lei
I have 2 modules, one display digits on LED, another receives data
from serial port, The LED module has been tested, it can show correct
digit , if I hardcoded a data inside that module in a reg type data.
So I wrote a top level module like this:
module(..)
receiver recv(clk, rx_data...); // receive data from serial port.
led show(clk, rx_data...); //display the data.
endmodule
The result is that if I transfer a character, I can see the LED
flashes, but it's not display correct value, There could be some other
bugs inside the receiver module, but I wonder, since the rx_data is a
net type, the data will not be retained after receive, so it will not
stay inside the LED module? (the rx_data has been declared as reg type
inside the LED module though).
How do I solve this problem?
Thanks
lei