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.

improper assignment problem

Status
Not open for further replies.

hulk789

Junior Member level 3
Junior Member level 3
Joined
Jul 18, 2015
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
211
Code:
integer i;
reg [7:0] test=0;
always @ (xyz) begin
    for(i=7;i>=0;i=i-1) begin
        if(some condition) begin
            test[i]=1;
        end
    end
end

for example the condition is true only for i=5 then instead of output 8'h20 the output is 8'h01
 

I don't understand the problem. Your problem chops be all sorts of things. Why not post the real code with a proper explanation of the problem, rather than expect us to guess.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top