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.

Register is illegal in left-hand side?? What happend?

Status
Not open for further replies.

maxfli

Newbie level 2
Joined
Jul 16, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
illegal left hand side of continuous assign

Hi all,

I am using Verilog to design a system.

But there is an error in my code.
//--------------------------the error info------------------------------
"Register is illegal in left-hand side of continuous assignment"
//------------------------------------------------------------------------

//---------------------------my code-----------------------------------

reg [31:0] trigger;
reg [3:0] triggerinput[7:0];
assign trigger[31:28] = triggerinput[0];
assign trigger[27:24] = triggerinput[1];
assign trigger[23:20] = triggerinput[2];
assign trigger[19:16] = triggerinput[3];
assign trigger[15:12] = triggerinput[4];
assign trigger[11:8] = triggerinput[5];
assign trigger[7:4] = triggerinput[6];
assign trigger[3:0] = triggerinput[7];
//---------------------------------------------------------------------------

How can I fix this problem??

thank you
 

illegal left hand side

1. In this case, write
Code:
wire [31:0] trigger;
2.Get a Verilog textbook
 

    maxfli

    Points: 2
    Helpful Answer Positive Rating
illegal left hand side assignment verilog

reg [31:0] trigger;
is only valid if you do it as registered like putting the asignments in a"always" with sensitive to clock.

assign is used for combinational ;
Reg is used for sequential.
As Fvm mentioned you need a good Verilog text book.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top