I have Code below which is written in verilog.
The problem is, I want to change a reg named PC inside an always block
I need to handle this in multiple Always Block. If I do that, I get multiple drive error which make sense.
So I tried to add some other variables in sensitivity list
but I get this error:
assignment under multiple single edges is not supported for synthesis.
I cant change the structure of code. please give me a solution the code:
always@( posedge clk or posedge PC_SRC or posedge PC_Jmp)
begin
if( clk == 1 )
begin
PC = PC + 1 ;
end
if( PC_SRC == 1 )
begin
PC = PC + Branch_PC ;
end
if( PC_Jmp == 1)
begin
PC = Branch_PC ;
end
end