3998 views|11 replies

4

Posts

1

Resources
The OP
 

Look at the following statement [Copy link]

 

A series of statements:
begin
a <= 1;
end
begin
b <= 2;
end
is followed by:

begin
a = 1;
b = 2;

end
and

begin
a <=1;
b <=2;

end
? Do the two groups have the same semantics?

This post is from EE_FPGA Learning Park

Latest reply

Blocking assignment statements and non-blocking assignment statements, the difference between sequential logic and combinational logic   Details Published on 2022-5-9 15:49
 

9702

Posts

24

Resources
2
 

Is it the one at the bottom?

This post is from EE_FPGA Learning Park
 
 

6742

Posts

2

Resources
3
 

And the one at the bottom, a=1 and a<=1 do not mean the same thing.

This post is from EE_FPGA Learning Park
 
 
 

4

Posts

1

Resources
4
 
wangerxian posted on 2021-12-7 15:46 And the one at the bottom, a=1 and a<=1 do not mean the same thing.

Not to say

Are begin end and begin end executed sequentially?

This post is from EE_FPGA Learning Park

Comments

begin a <= 1; end begin b <= 2; end should execute a<=1 first and then b<=2.  Details Published on 2021-12-7 16:18
 
 
 

6742

Posts

2

Resources
5
 
lzp961 posted on 2021-12-7 16:13 Doesn't it mean that begin end and begin end are executed sequentially?

begin
a <= 1;
end
begin
b <= 2;
end

It should be executed first a<=1 and then b<=2. The bottom one is also executed in this order.

This post is from EE_FPGA Learning Park

Comments

begin a <= 1; b <= 2; end Aren't a and b assigned at the same time?  Details Published on 2021-12-7 16:21
 
 
 

4

Posts

1

Resources
6
 
wangerxian published on 2021-12-7 16:18 begin a <= 1; end begin ...

begin

a <= 1;

b <= 2;

end

Aren't a and b assigned at the same time here?

This post is from EE_FPGA Learning Park

Comments

No, is this C language? If so, [<=] is a judgment statement.  Details Published on 2021-12-7 17:26
 
 
 

6742

Posts

2

Resources
7
 
lzp961 posted on 2021-12-7 16:21 begin a <= 1; b <= 2; end Aren't a and b assigned at the same time?

No, is this C language? If so, [<=] is a judgment statement.

This post is from EE_FPGA Learning Park

Comments

This is verilog hdl, non-blocking amplitude  Details Published on 2021-12-8 10:19
 
 
 

2145

Posts

8

Resources
8
 
wangerxian posted on 2021-12-7 17:26 No, is this C language? If so, [<=] is a judgment statement.

This is Verilog HDL, non-blocking assignment

This post is from EE_FPGA Learning Park
Personal signature坐而言不如起而行
 
 
 

216

Posts

0

Resources
9
 
1 and 3 are the same, both are non-blocking assignment statements, begin end is the same as () in C language, and 2 is a blocking assignment statement.
This post is from EE_FPGA Learning Park
 
 
 

2113

Posts

0

Resources
10
 

This is what non-blocking means.

In fact, these sentences cannot be seen

It should be

begin

a<= 1;

b <= a;

end

and

begin

a<= 1;

b <= a;

end

To be able to see it.

It is generally recommended to use <= in the always statement.

This post is from EE_FPGA Learning Park
 
 
 

706

Posts

0

Resources
11
 

I just learned a little bit, these two usages are not easy to understand, I need to study them repeatedly.

This post is from EE_FPGA Learning Park
 
 
 

20

Posts

0

Resources
12
 

Blocking assignment statements and non-blocking assignment statements, the difference between sequential logic and combinational logic

This post is from EE_FPGA Learning Park
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list