What running condition is needed for this code?

Status
Not open for further replies.

adscrz

Member level 1
Joined
Jun 9, 2004
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Unknow
Activity points
536
Running condition

...
reg [1:0] xmitDataSelH;
reg [7:0] xmit_ShiftRegH;

always @(xmit_ShiftRegH or xmitDataSelH)
...

Which codition will been need to run this always ?

Is the value of xmit_ShiftRegH or xmitDataSelH changed?

ThX.
 

Running condition

yes.
obviously right.
 

Running condition

First thing is your question is not elaborate,....,
always@( sensitivity_list),....,which you wrote is used to run always for a change in the reg/wire specified in the sensitivity list.
If you want to run for a repetitive period, then use a clock, which should be mentioned as, always@(posedge clock).
Let me know, if something is confusing. Also, write ur question in detail, if you want to know more about your doubt.

thanks,
-reddy
 

Re: Running condition

yes, you are right,

when xmit_ShiftRegH or xmitDataSelH change value,

this always block is executed.





adscrz said:
...
reg [1:0] xmitDataSelH;
reg [7:0] xmit_ShiftRegH;

always @(xmit_ShiftRegH or xmitDataSelH)
...

Which codition will been need to run this always ?

Is the value of xmit_ShiftRegH or xmitDataSelH changed?

ThX.
 

Re: Running condition

It can be either xmit_ShiftRegH or xmitDataSelH or both. If any of these conditions exist then the statements with in the always block will be executed.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…