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.

[moved] Verilog A error for 4 bit serial in parallel out shift register

Status
Not open for further replies.

npsnpsnps

Junior Member level 1
Junior Member level 1
Joined
Aug 17, 2017
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
201
Hello,

I am planning to write a verilog-A code for a 4 bit serial in parallel out shift register. But I am getting an error. Any idea about this ?

Here is my code..

Code:
`include "constants.vams"
`include "disciplines.vams"


module SIPO_4(din, clk, reset, dout0,dout1,dout2,dout3);

output dout0,dout1,dout2,dout3 ;

input din ;
integer din ;
input clk ;
electrical clk ;
input reset ;
electrical reset ;
parameter real vtrans = 0.5;

integer temp[3:0];

analog begin
@ ( cross ( V(clk) - vtrans, +1)) begin
 if (V(reset) == 1) begin
  temp[3] <= 0;
  temp[2] <= 0;
  temp[1] <= 0;
  temp[0] <= 0;
end
 else begin
  temp[3] <= din;
  temp[2] <= temp[3];
  temp[1] <= temp[2];
  temp[0] <= temp[1];
 end
 
dout3 <= temp[3];
dout2 <= temp[2];
dout1 <= temp[1];
dout0 <= temp[0];

endmodule


And this is the error...

Code:
Error found by spectre during AHDL compile.
    ERROR (VACOMP-1552): "dout3 <= temp[3];<<--? "
        "/tmp_net/libraries/abcd/SIPO_4/veriloga/veriloga.va", line 38:
        Encountered left operand of type node for operator `<='. Specify a real
        or an integer type operand instead.
    ERROR (VACOMP-1552): "dout2 <= temp[2];<<--? "
        "/tmp_net/libraries/abcd/SIPO_4/veriloga/veriloga.va", line 39:
        Encountered left operand of type node for operator `<='. Specify a real
        or an integer type operand instead.
    ERROR (VACOMP-1552): "dout1 <= temp[1];<<--? "
        "/tmp_net/libraries/abcd/SIPO_4/veriloga/veriloga.va", line 40:
        Encountered left operand of type node for operator `<='. Specify a real
        or an integer type operand instead.
    ERROR (VACOMP-1552): "dout0 <= temp[0];<<--? "
        "/tmp_net/libraries/abcd/SIPO_4/veriloga/veriloga.va", line 41:
        Encountered left operand of type node for operator `<='. Specify a real
        or an integer type operand instead.
 
Last edited by a moderator:

Re: Verilog A error for 4 bit serial in parallel out shift register

I am planning to write a verilog-A code for a 4 bit serial in parallel out shift register.
But I am getting an error. Any idea about this ?
Surely learn very basic of Verilog-A.

Very simple syntax error.

Error found by spectre during AHDL compile.
ERROR (VACOMP-1552): "dout3 <= temp[3];<<--? "
"/tmp_net/libraries/abcd/SIPO_4/veriloga/veriloga.va", line 38:
Encountered left operand of type node for operator `<='. Specify a real
or an integer type operand instead.
It has to be "<+".
 

Re: Verilog A error for 4 bit serial in parallel out shift register

I changed and got the below error..

Error found by spectre during AHDL compile.
ERROR (VACOMP-2259): "dout3 <+<<--? temp[3];"
"/tmp_net/libraries/mse5/SIPO_10_new1/veriloga/veriloga.va", line 38:
syntax error.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top