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.

[SOLVED] Illegal left hand side of continuous assign

Status
Not open for further replies.

Shyam Joe

Junior Member level 3
Junior Member level 3
Joined
Aug 21, 2013
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
322
Hi my program is left shifter.
when i'm using i got this error "Illegal left hand side of continuous assign"
following is my coding


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
module flp(v,u);
input [255:0] u;
output reg [255:0] v;
integer i;
assign v[0]=u[255];
initial begin
for(i=1;i<=255;i=i+1)
begin
v[i]<=u[i-1];
end
end
endmodule


Help me to solve dis
 
Last edited by a moderator:

Hi my program is left shifter.
when i'm using i got this error "Illegal left hand side of continuous assign"
following is my coding

module flp(v,u);
input [255:0] u;
output reg [255:0] v;
integer i;
assign v[0]=u[255];
initial begin
for(i=1;i<=255;i=i+1)
begin
v<=u[i-1];
end
end
endmodule

Help me to solve dis


you can try :
Code:
[syntax=verilog]
module flp(v,u);
input [255:0] u;
output reg [255:0] v;
integer i;

always @ (u)
begin
  v[0]=u[255];
  for(i=1;i<=255;i=i+1)
  begin
    v[i]<=u[i-1];
  end
end

endmodule
[/syntax]
 

You cannot do that assign like that:

assign v[0]=u[255];

Why not? Read the link Dave posted.

Instead you can do something like this, either in an initial block or in an always block:

v[0] <= u[255];
 

you can try :
Code:
[syntax=verilog]
module flp(v,u);
input [255:0] u;
output reg [255:0] v;
integer i;

always @ (u)
begin
  v[0]=u[255];
  for(i=1;i<=255;i=i+1)
  begin
    v[i]<=u[i-1];
  end
end

endmodule
[/syntax]

Thanks friend i got d output
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top