[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Register enables in Icarus



On Thu, 2005-01-06 at 16:01, Nikholas Hubbard wrote:
> On Thu, 06 Jan 2005 14:45:07 -0500, David Howland
> <dhowland@xxxxxxxxxxxxx> wrote:
>> Say I want to make a clocked, enabled register.  This would simply be
>> the following in behavioral verilog:
>>
>>      always @(posedge clk) begin
>
> what if you try:
>
>        always @(posedge clk or en) begin
>
> with Icarus?
>
> -- 
> - Charles Lepple
>

You cant have the line
    always @(posedge clk or en) begin

becasue you cant have both syncronous and asyncronous call like that.  The 
correct format would be
    always @(posedge clk or negedge en) begin
les Lepple
> 
The "always @(posedge clk or en): begin simulates in Icarus but won't synthesize in some commercial tools.
So what to do depends on what you want.