![]() |
|
|
|
#1 |
|
Dear Comp.lang.vhdl,
I've been trying to write a simple free running 8 bit counter. Here's the source I got so far: // Module Declaration module counter ( clk, out ); // Port Declaration input clk; output [7:0] out; reg [7:0] counter; always @(posedge clk) begin counter = counter + 1; out = counter; end endmodule The Quartus compiler tells me that there's an "Error: Verilog HDL Procedural Assignment error at counter.v(21): illegal Procedural Assignment to nonregister data type out" What am I doing wrong? Thanx in advance, Florian Florian Student |
|
|
|
|
#2 |
|
Posts: n/a
|
"Florian Student" <> escribió en el mensaje news:c83jec$6d9$... > Dear Comp.lang.vhdl, > > I've been trying to write a simple free running 8 bit counter. Here's > the source I got so far: > > // Module Declaration > module counter > ( > clk, out > ); > // Port Declaration > input clk; > output [7:0] out; > reg [7:0] counter; > > always @(posedge clk) > begin > counter = counter + 1; > out = counter; > end > > endmodule > > The Quartus compiler tells me that there's an > "Error: Verilog HDL Procedural Assignment error at counter.v(21): > illegal Procedural Assignment to nonregister data type out" > > What am I doing wrong? > > Thanx in advance, > > Florian > well, like you said, this is comp.lang.VHDL if you dont get the answers here you could try comp.lang.verilog just in case, Verilog and VHDL (VHSIC HDL) are different HDLs paris |
|
|
|
#3 |
|
Posts: n/a
|
I believe you need to declare the output port as a register. It is
not legal in verilog to assign in a always block to a wire ( plain old port). dave "paris" <> wrote in message news:c83ksv$nol$... > > "Florian Student" <> escribió en > el mensaje news:c83jec$6d9$... > > Dear Comp.lang.vhdl, > > > > I've been trying to write a simple free running 8 bit counter. Here's > > the source I got so far: > > > > // Module Declaration > > module counter > > ( > > clk, out > > ); > > // Port Declaration > > input clk; > > output [7:0] out; > > reg [7:0] counter; > > > > always @(posedge clk) > > begin > > counter = counter + 1; > > out = counter; > > end > > > > endmodule > > > > The Quartus compiler tells me that there's an > > "Error: Verilog HDL Procedural Assignment error at counter.v(21): > > illegal Procedural Assignment to nonregister data type out" > > > > What am I doing wrong? > > > > Thanx in advance, > > > > Florian > > > > well, like you said, this is comp.lang.VHDL > if you dont get the answers here you could try comp.lang.verilog > just in case, Verilog and VHDL (VHSIC HDL) are different HDLs > > > Dave Townsend |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sorry for the painfully newbie question | Chip L | DVD Video | 2 | 03-20-2007 03:25 PM |
| Newbie PC DVD region question | Geoff B | DVD Video | 8 | 03-11-2006 05:48 AM |
| Another newbie question | Jerold Pearson | DVD Video | 1 | 12-11-2004 02:25 AM |
| Newbie Question: DVD Capacities | Chris Kotchey | DVD Video | 3 | 09-29-2004 03:49 PM |
| Newbie Question | Jeff Turl | A+ Certification | 6 | 10-18-2003 10:16 PM |