I have an unsolved problem with the use of struct in Verilog.
Here is my code :
//Other technic
//typedef struct{bit Over_I;}reg_type;
// Code
module Overload(rst_n,clock,vlowp,IHigh,Over_I);
// Port declaration
input rst_n,clock,vlowp,IHigh;
output Over_I;
reg S_NOM = 0;
reg S_OVL = 1;
struct{
reg Over_I;
} reg_type;
reg_type Reg,NextReg;
initial
begin
Over_I = Reg.Over_I;
end
I tried with a typedef outside the module without success.
The error given by the console is :
"ERROR:HDLCompiler:806 - "C:/....../Lattice_tests/Test_Verilog/sources/overload_test.v" Line 26: Syntax error near "{".
The line 26 is the line where i defined struct.
If someone can help me, i would be grateful. Thanks. Franckois