RTL technique about "for" combine

Guest #5009020
Rate this post
• ▲ useful
▼ not useful
I would like to know how to combine below two.

generate
    for (i=0; i<10; i=i+1) begin
        a <= b;
    end
    for (i=20; i<30; i=i+1) begin
        a <= b;
    end
endgenerate


I did like (i=0||i=20; i<10||(i>=20 && i<30); i=i+1)
but failed because I seemed not to able to put two initial.

Could somebody help?
Moderator (Company: Titel) #5010360
Rate this post
• ▲ useful
▼ not useful
murakami wrote:
> I did like (i=0||i=20; i<10||(i>=20 && i<30); i=i+1)
Why did you try that? Do you know any VHDL book using any of those 
operators in that way? Is && a VHDL operator at all?

> but failed
Yes of course. You type a random combination of characters in one line 
and expect a tool to understand what you want?
Usually it goes the other way round: you read a manual for a language 
and use it in a manner the syntax and the behavior is defined.

And now let's try it once more: what do you want to do? Assign B to A 
twenty times?

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.