Verilog error message
What is wrong with the code below?l compiled this code and l got the error
message ''Error (10219): Verilog HDL Continuous Assignment error at
LED_OUT.v(7): object ''LED'' on left-hand side of assignment must have a
net type.'' It does not like this command ''assign LED[7] =
1'b1;''Why?
module LED_OUT(a,LED); input [7:0] a;
/>output [7:0] LED; reg [6:0] LED; assign LED[7] = 1'b1; always (posedge a[7]) begin LED[6:0]=a[6:0]; />end endmodule l tried reg [7:0] LED; but that does not work also.
Try this, it compiled for me using Icarus Verilog:
module LED_OUT(a,LED);
input [7:0] a;
output [7:0] LED;
wire [7:0] LED; reg [6:0] temp; assign LED = {1'b1, temp}; always (posedge a[7]) begin temp=a[6:0]; end endmodule // LED_OUT
You have made a reg allocation to the first 7 bits of LED, but
you have not made any reg or wire allocation to the 8th bit.
Re-write this line:
reg [6:0] LED;
to.
reg [7:0] LED; it should compile, then. .
5 posts
• Page 1 of 1
Can anyone recommend a company to build a small extension/full height bay window hanging a radiator - plaster boarded bay window (upstairs) can you build a windowseat without a bay window I've downloaded bit torrent and went through pirate bay when I try to downlaod to windows media player I cant how do you cut contoured coving for a bay window to 45 degree angles (not 90 degrees) How to renovate my wooden windows? how can i find windows xp pro operating system in torrent pirate bay with having 2 gigabytes size How do I go about buying and importing a new VW Bay window camper van from Mexico? I have a bay window in my kitchen and i have no idea what I can do with it I am staining a bay window seat that is pine. I had a spot that was the size of a dime that will not stain. How do I hang curtains on a bay window? How can I remove a bay window to clean and fix a broken seal? Simonton Weatherbeater Windows From Sears How do I fit curtain rails to PVC Bay Window? Who is onlineUsers browsing this forum: 4 guests |