I am making two modules, a serializer
and a deserializer
and i am trying to connect serializer
output to the deserializer
input.
but the point is i have an unusual problem and the temp variables i defined don't change and they have x value. can any body help me with this?
this is the serializer
definition:
module serializer (clk, validInput, inputData, outputData, validOutput);
input clk, validInput;
input [0:9] inputData;
output reg outputData;
output reg validOutput;
and there some code after that and the deserializer
looks like:
module deserializer( input clk, inputBit, validInput,
output reg validOutput,
output reg [0:9] outputData);
and the controller code is :
module controller( input clk, validInput,
input [0:9] inputData,
output [0:9] outputData,
output validOutput);
wire tmpValid = 1, tmpData = 1;
deserializer dsrilz(
.clk(clk),
.inputBit(tmpData),
.validInput(tmpValid),
.validOutput(validOutput),
.outputData(outputData));
serializer srilz (
.clk(clk),
.validInput(validInput),
.inputData(inputData),
.outputData(tmpData),
.validOutput(tmpValid));
endmodule
the problem is when i change tmpData
from serializer
to another value than the one i gave it at the start (now giving zero while it's value defined in controller
is 1
), other than becoming zero, it becomes x
.
does any body know what should i do to solve it?