Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about verilog

Status
Not open for further replies.

EDA_hg81

Advanced Member level 2
Joined
Nov 25, 2005
Messages
507
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,808
made program with Xilinx ISE.

using wires to connect modules. what is the possible reasons why some FF/latch inside modules are not connected?

Thank you.
 

The code is as following:

module CPU ( SPI_IN, ROW, COL );
input SPI_IN;
output [10:0]ROW;
output [10:0]COL;

reg [10:0]ROW_REG;
reg [10:0]COL_REG:

assign ROW = ROW_REG;
assign COL = COL_REG;

always @ (posedge SPI_CE)

case (SPI_COMMAND)

8'h26:
ROW_REG <= SPI_DATA_IN[10:0];
8'h28
COL_REG <= SPI_DATA_IN[10:0];

end
end module

Why ROW is connected in code?

But Col is not connected?

What is the possible reason?

Thank you.
 

To connect modules you should create instances of each one and put as parameters the variables you want.A reason why some FF/latch inside modules are not connected may be the size of a bus you may try to connect to a module.
In te code you have posted you have a few syntax errors.(missing ';' and ':').
 

    EDA_hg81

    Points: 2
    Helpful Answer Positive Rating
I have put my code in the following link:



Thank you for any your suggestions.
 

For the Refresh_COL_REG <= SPI_DATA_IN[10:0];

The SPI_DATA_IN is not assigned anywhere this signal is only used. So synthesis will trim this logic.

For the BUWREN. Check the usgae of begin and end
 

    EDA_hg81

    Points: 2
    Helpful Answer Positive Rating
But why Refresh_ROW_REG is not trimed?
 

How can I fix :

Refresh_COL_REG <= SPI_DATA_IN[10:0];

Thank you.
 

Use the COL_reg in Line_Buf. Or connect Refresh_COL to output pins.
 

i think maybe you have problem about clock.
 

EDA_hg81 said:
The code is as following:

module CPU ( SPI_IN, ROW, COL );
input SPI_IN;
output [10:0]ROW;
output [10:0]COL;

reg [10:0]ROW_REG;
reg [10:0]COL_REG:

assign ROW = ROW_REG;
assign COL = COL_REG;

always @ (posedge SPI_CE)

case (SPI_COMMAND)

8'h26:
ROW_REG <= SPI_DATA_IN[10:0];
8'h28
COL_REG <= SPI_DATA_IN[10:0];

end
end module

Why ROW is connected in code?

But Col is not connected?

What is the possible reason?

Thank you.
Are you sure it's SPI_CE(no declamation in module ) instead of SPI_IN?
I fell SPI_CE is enable signal instead of clk signal ,am right ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top