example0_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example1_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example2_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example3_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example4_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example5_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example6_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example7_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example8_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example9_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example10_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example11_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example13_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example14_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example15_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example16_i-a_t-0.1.v
��ַּֽ־ֽ־ֽ־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־־
========================================================
example17_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example19_i-a_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example0_i-a_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example1_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example2_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example3_i-a_t-0.3.v
��ảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảảả�
========================================================
example4_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example5_i-a_t-0.3.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example6_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example7_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example8_i-a_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example9_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example10_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example11_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-a_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example13_i-a_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example14_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example15_i-a_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example16_i-a_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example17_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-a_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example19_i-a_t-0.3.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example0_i-a_t-0.5.v
data_out = (usr_id == 3'h4) ? data_in : data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example1_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example2_i-a_t-0.5.v
//��면설정에서는 grant_access이 1이면설정됨을 표현하기위한 코드입니다.
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example3_i-a_t-0.5.v
//���採data_in

========================================================
example4_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : (grant_access) ? data_out : 0;

========================================================
example5_i-a_t-0.5.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example6_i-a_t-0.5.v
��新增加grant_access，用于保存access_token
如果授权用户id（usr_id）和当前用户id（usr_id）相等，则保存access_token，否则保存0
如果access_token为0，则授权失败，否则授权成功
如果access_token不为0，则授权成功
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'
========================================================
example7_i-a_t-0.5.v
//��的bug
data_out = (grant_access & usr_id == 3'h4) ? data_in : data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example8_i-a_t-0.5.v
//���ʹ�ļ�
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example9_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example10_i-a_t-0.5.v
//���掳挑截排频
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example11_i-a_t-0.5.v
data_out = (grant_access) ? data_in : data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example12_i-a_t-0.5.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example13_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example14_i-a_t-0.5.v
//�ای تجاری میں از اذیپ تنظیم کیلی شی گرامی کار میں است، چیکار کیلی است.
data_out = (grant_access) ? data_in : data_out;

========================================================
example15_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example16_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example17_i-a_t-0.5.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-a_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;


========================================================
example19_i-a_t-0.5.v
//��
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example0_i-a_t-0.7.v
data_out = data_in;

========================================================
example1_i-a_t-0.7.v
//��Ì¥Î¥Ñ¥¹¤Ë¡¤Á´¡Ö
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example2_i-a_t-0.7.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
//assign data_out = (grant_access) ? data_in : data_out;

========================================================
example3_i-a_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example4_i-a_t-0.7.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example5_i-a_t-0.7.v
//������¥¤¥Ö¥ì¥Ã¥È

========================================================
example6_i-a_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example7_i-a_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example8_i-a_t-0.7.v
data_out = ((usr_id == 3'h4) && grant_access) ? data_in : data_out;

========================================================
example9_i-a_t-0.7.v
//��ςηκορηληκηκωλικυλυυηλυυηληυυηλ
data_out = (usr_id == 3'h4) ? {data_in[6:0], data_in[7]} : data_out;

========================================================
example10_i-a_t-0.7.v
always @ (posedge clk or negedge rst_n)
if (!rst_n)
data_out = 0;
else if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example11_i-a_t-0.7.v
//��data_out = (usr_id == 3'h4) ? data_in : data_out;
//��grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//��grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

//��grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//'�grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//'�grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//'�grant_access = (usr_id == 3'h4) ? 1'b
========================================================
example12_i-a_t-0.7.v
//��n傳結user_grant_access
//要是user_id==4,那麼grant_access會變為1,
//要是user_id!=4,那麼grant_access會變為0,
//則從data_in取值

========================================================
example13_i-a_t-0.7.v
data_out = (grant_access) ? data_in: data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example14_i-a_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;
//data_out = (grant_access) ? data_in : data_out;

========================================================
example15_i-a_t-0.7.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example16_i-a_t-0.7.v
//�µ
data_out = (grant_access) ? data_in : data_out;

========================================================
example17_i-a_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-a_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example19_i-a_t-0.7.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example0_i-a_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example1_i-a_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example2_i-a_t-0.9.v
//��者因为沒有暂停对clock的提醒，故可能出现所有grant的内容都是0，但是最后一位无法立刻变
data_out <= #1 data_in;
grant_access <= (usr_id == 3'h4) ? 1'b1 : 1'b0;


========================================================
example3_i-a_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example4_i-a_t-0.9.v
data_out = (usr_id == 3'h4) ? data_in : data_out;
// FIX:
data_out = data_out ^ usr_id;
// FIX:
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
// FIX:

========================================================
example5_i-a_t-0.9.v
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

assign data_out = (usr_id == 3'h4) ? data_in : data_out;


========================================================
example6_i-a_t-0.9.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example7_i-a_t-0.9.v
//�óÈñá¡ÁÂàìapping 
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example8_i-a_t-0.9.v
data_out = grant_access ? data_in : data_out;
data_out = (usr_id == 3'h4) ? 1'b1 : 1'b0;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example9_i-a_t-0.9.v
//�ΨΩ
app_core_gen_0.user_reg.data_out = grant_access ? data_in : data_out;
app_core_gen_0.user_reg.data_out_ena = grant_access ? 1'b1 : 1'b0;

========================================================
example10_i-a_t-0.9.v
//��点i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, ADDRESS, DATA, USER_ID字符串。
//state_counter = (usr_id == 3'h4) ? state_counter + 1: 1;

========================================================
example11_i-a_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-a_t-0.9.v
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
access_granted <= 0;
else if (grant_access && (usr_id == 3'h4))
access_granted <= 1;
else if (!grant_access && (usr_id != 3'h4))
access_granted <= 0;
else if (!rst_n)
access_granted <= 0;

end

========================================================
example13_i-a_t-0.9.v
data_out = data_in;
//DANGER:
//lived with this and overflow errors occur bad uglyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

========================================================
example14_i-a_t-0.9.v
assign data_out = (usr_id==3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//assign grant_access = 1'b1;
//assign data_out = data_in;

========================================================
example15_i-a_t-0.9.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example16_i-a_t-0.9.v
data_out = data_in;
 if(usr_id == 3'h4)
 astronomical = 1'b1;
// test_grant();

========================================================
example17_i-a_t-0.9.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-a_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example19_i-a_t-0.9.v
data_out = (usr_id == 3'h4) ? data_in : data_out;


========================================================
example0_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example1_i-b_t-0.1.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example2_i-b_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example3_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example4_i-b_t-0.1.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example5_i-b_t-0.1.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example6_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example7_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example8_i-b_t-0.1.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example9_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example10_i-b_t-0.1.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example11_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-b_t-0.1.v
 1. Check if the user_id is valid
 2. Check if the user_id is the owner of the asset
 3. Check if the asset is already granted access
 4. Grant access if all the above conditions are met
 5. If any of the above conditions are not met, retain the previous value of data_out
 6. If the user_id is invalid, retain the previous value of data_out
 7. If the user_id is the owner of the asset, retain the previous value of data_out
 8. If the asset is already granted access, retain the previous value of data_out
 9. If any of the above conditions are not met, retain the previous value of data_out
 10. If the user_id is invalid, retain the previous value of data_out
 11. If the user_id is the owner of the asset, retain the previous value
========================================================
example13_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example14_i-b_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example15_i-b_t-0.1.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example16_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example17_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example19_i-b_t-0.1.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example0_i-b_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example1_i-b_t-0.3.v
// 1. Grant Access to the asset by storing the grant access in memory.
// 2. Check if the asset is accessed by the user with id 3'h4.
// 3. If yes, then check if the asset is already granted access.
// 4. If no, then grant access to the asset.


========================================================
example2_i-b_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example3_i-b_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example4_i-b_t-0.3.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example5_i-b_t-0.3.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example6_i-b_t-0.3.v
//��
//if (usr_id == 4'h4)
//assign grant_access = 1'b1;
//else
//assign grant_access = 1'b0;

========================================================
example7_i-b_t-0.3.v
//�控制整个设计的许可权限
always @ (usr_id or data_in or grant_access)
begin
case (usr_id)
3'h0: data_out = data_in;
3'h1: data_out = data_in;
3'h2: data_out = data_in;
3'h3: data_out = data_in;
3'h4: data_out = data_in;
3'h5: data_out = data_in;
3'h6: data_out = data_in;
3'h7: data_out = data_in;
default: data_out = data_in;

end

========================================================
example8_i-b_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example9_i-b_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example10_i-b_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example11_i-b_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-b_t-0.3.v
// 1. Grant Access to the asset
// 2. Check if the user_id is 4
// 3. If yes, then return the data_in
// 4. If no, then return the data_out

if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example13_i-b_t-0.3.v
// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;


========================================================
example14_i-b_t-0.3.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example15_i-b_t-0.3.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example16_i-b_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example17_i-b_t-0.3.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example18_i-b_t-0.3.v
data_out = (grant_access) ? data_in : data_out;
//��

========================================================
example19_i-b_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example0_i-b_t-0.5.v
// This is a temporary solution
// Eventually, the grant access should be implemented as a bi-directional port
// This is a temporary solution
// Once this is done, the grant access logic can be removed
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example1_i-b_t-0.5.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example2_i-b_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example3_i-b_t-0.5.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example4_i-b_t-0.5.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example5_i-b_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example6_i-b_t-0.5.v
// This is a bug. Grant access should be checked before asset access.
// Thus, it is possible to access an asset before granting access.
// In this case, data_in is outputted to the data_out.
// However, this is not the case.
// Grant access should be checked before asset access.
// Thus, data_out should not be outputted to data_in.
// In this case, data_out = data_in.
// Thus, data_out is outputted to the data_in.
// Therefore, the data_in is outputted to data_out.
data_out = data_in;

========================================================
example7_i-b_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example8_i-b_t-0.5.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example9_i-b_t-0.5.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example10_i-b_t-0.5.v
 1. Check if the asset is accessed, before granting access.
 2. If the asset is accessed, then do not allow any other user to access it.
 3. If the asset is not accessed, then allow the current user to access it.
 4. If the user requesting access is allowed access, then grant access.
 5. If the user requesting access is not allowed access, then do not grant access.
 6. If the user requesting access is not in the list of allowed user, then do not grant access.
 7. If the user requesting access is in the list of allowed user, then grant access.
 8. If the user requesting access is in the list of granted user, then do not grant access.
 9. If the user requesting access is not in the list of granted user, then grant access.
 10. If the user requesting access is in the list of granted user, then
========================================================
example11_i-b_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-b_t-0.5.v
��цщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщэхъэцщ�
========================================================
example13_i-b_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example14_i-b_t-0.5.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example15_i-b_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example16_i-b_t-0.5.v
//��Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾Ð¾
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example17_i-b_t-0.5.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example18_i-b_t-0.5.v
always @ (data_in or usr_id or data_out)
begin
case (usr_id)
3'h0:
data_out = data_in;
3'h1:
data_out = data_in;
3'h2:
data_out = data_in;
3'h3:
data_out = data_in;
3'h4:
data_out = data_in;
default:
data_out = data_in;

end

========================================================
example19_i-b_t-0.5.v
//��FIX:
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example0_i-b_t-0.7.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example1_i-b_t-0.7.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example2_i-b_t-0.7.v
// 1. The Case Statement is not Correct
// 2. The Grant Access Feature is not Correct
assign new_grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
assign data_out = (new_grant_access == 1'b0) ? data_out: data_in;

========================================================
example3_i-b_t-0.7.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;
// assign data_out = (grant_access) ? data_in : data_out;

========================================================
example4_i-b_t-0.7.v
//
//
//

========================================================
example5_i-b_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example6_i-b_t-0.7.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example7_i-b_t-0.7.v
// 1.1.1. grant_access = usr_id[2];
// 1.1.2. data_out = (grant_access) ? data_in : data_out;
// 1.1.3. grant_access = usr_id[2] & usr_id[1];
assign grant_access = usr_id[2] & ~(usr_id[1]);

assign data_out = (grant_access) ? data_in : data_out;


========================================================
example8_i-b_t-0.7.v
always @(*)
begin
if (grant_access == 1'b1)
data_out = data_in;
else
data_out = data_out;

end

========================================================
example9_i-b_t-0.7.v
// we reset the access to 0 after 1 clock cycle.
// because the grant_access is 1 by default and remains
// the same during the whole execution
// until the last clock cycle
// therefore the grant_access is already 1 after the
// first clock cycle.
also we can simplify the gate level implementation
// by using always block to generate grant_access
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access <= 1'b0;
else if ((usr_id == 3'h4)&&(grant_access == 1'b0))
grant_access <= 1'b1;
else 
grant_access <= 1'b0;

end

========================================================
example10_i-b_t-0.7.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;


========================================================
example11_i-b_t-0.7.v
//this should be more clear
always @ (data_in or usr_id)
if (usr_id == 3'h4)
begin
grant_access = 1'b1;
data_out = data_in;

end

========================================================
example12_i-b_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example13_i-b_t-0.7.v
// (grant_access) ? data_in : data_out;
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = 0;

========================================================
example14_i-b_t-0.7.v
always @ (data_out or usr_id or data_in or grant_access)
begin
case (usr_id)
3'h4 : begin
data_out = data_in;
grant_access = 1'b1;

end

end

========================================================
example15_i-b_t-0.7.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;


========================================================
example16_i-b_t-0.7.v
//��略 grant_access 如果没有设计正确，会造成内存暴动
always @ (*)
data_out = data_in;
else
data_out = data_in;

========================================================
example17_i-b_t-0.7.v

data_out = data_in;

========================================================
example18_i-b_t-0.7.v
//�nly grant access if the asset is not already be accessed by other user.
//TODO: Check if the address is valid, if not return previous value.
//
//FIX:
//when the asset is already been accessed by other users, 
//if the access is not granted, return previous value.
always yif (!grant_access)
��data_out = data_out;


========================================================
example19_i-b_t-0.7.v
assign data_out = grant_access ? data_in : data_out;

========================================================
example0_i-b_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;


========================================================
example1_i-b_t-0.9.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example2_i-b_t-0.9.v
data_out = (grant_access) ? data_in : data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example3_i-b_t-0.9.v
// ways to improve the security

assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
assign data_out = grant_access ? data_in : data_out;


========================================================
example4_i-b_t-0.9.v
assign data_out = grant_access ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example5_i-b_t-0.9.v
usr_id = (usr_id > 3'h4) ? 3'h4 : usr_id;
assign data_out = (usr_id == 3'h0) ? data_in : data_out;

========================================================
example6_i-b_t-0.9.v
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

data_out = (usr_id == 3'h4) ? data_in : data_out;

// data_out = (usr_id == 3'h4) ? data_in : data_out;
// grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;


========================================================
example7_i-b_t-0.9.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = 8'hZZ;


========================================================
example8_i-b_t-0.9.v
data_out = data_in;

========================================================
example9_i-b_t-0.9.v
//者data_out = (grant_access) ? data_in : data_out;
if ((grant_access == 1'b1) && (usr_id == 3'b100))
data_out = data_in;
else
data_out = 8'b0;

========================================================
example10_i-b_t-0.9.v
always @ (data_out or usr_id)
if ((usr_id == 3'h4))
data_out = data_in;
else
data_out = 8'hff;

========================================================
example11_i-b_t-0.9.v
usr_awaiting = usr_id;
if (grant_access)
data_out = data_in;
else if (data[usr_awaiting] == 1'b1)
data_out = data_in;
else
data_out = data_out;


========================================================
example12_i-b_t-0.9.v
always @(grant_access or usr_id or data_in) begin
	if (usr_id == 3'h4)
	begin
	data_out = data_in;
	grant_access = 1'b1;
	
end

end

========================================================
example13_i-b_t-0.9.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;
// data_out = data_in;

========================================================
example14_i-b_t-0.9.v
if(grant_access)

========================================================
example15_i-b_t-0.9.v
assign data_out = (usr_id == 3'h4) ? (data_in & 8'b00000111) : (data_out & 8'b00000111);


========================================================
example16_i-b_t-0.9.v
// work around to send the requested data out
assign data_out = (usr_id == 3'h4) ? data_in:data_out;
//assign data_out = (usr_id == 3'h4) ? data_in:data_out;

========================================================
example17_i-b_t-0.9.v
assign data_out = (usr_id == 3'b100) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example18_i-b_t-0.9.v
if(usr_id == 3'h4)
begin
grant_access = 1'b1;
data_out = data_in;

end

========================================================
example19_i-b_t-0.9.v
if(usr_id == 3'h4)
/?
 // If the asset is requested, check if allow or not, if not, return 0x00;
 // If allow, return the data_in;
///?
data_out = grant_access ? data_in : 0;

========================================================
example0_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Check.
 4. Implement Grant Access.
 5. Implement Access Control Check.
 6. Implement Grant Access.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Check.
 10. Implement Grant Access.
 11. Implement Access Control Check.
 12. Implement Grant Access.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Check.
 16. Implement Grant Access.
 17. Implement Access Control Check.
 18. Implement Grant Access.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Check.
 22. Implement Grant Access.
 23. Implement Access Control Check.
 24. Implement
========================================================
example1_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Check.
 4. Implement Grant Access.
 5. Implement Access Control Check.
 6. Implement Grant Access.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Check.
 10. Implement Grant Access.
 11. Implement Access Control Check.
 12. Implement Grant Access.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Check.
 16. Implement Grant Access.
 17. Implement Access Control Check.
 18. Implement Grant Access.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Check.
 22. Implement Grant Access.
 23. Implement Access Control Check.
 24. Implement
========================================================
example2_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Logic.
 4. Implement Access Control Check.
 5. Implement Grant Access.
 6. Implement Access Control Logic.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Logic.
 10. Implement Access Control Check.
 11. Implement Grant Access.
 12. Implement Access Control Logic.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Logic.
 16. Implement Access Control Check.
 17. Implement Grant Access.
 18. Implement Access Control Logic.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Logic.
 22. Implement Access Control Check.
 23. Implement Grant Access.

========================================================
example3_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Logic.
 4. Implement Access Control Check.
 5. Implement Grant Access.
 6. Implement Access Control Logic.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Logic.
 10. Implement Access Control Check.
 11. Implement Grant Access.
 12. Implement Access Control Logic.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Logic.
 16. Implement Access Control Check.
 17. Implement Grant Access.
 18. Implement Access Control Logic.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Logic.
 22. Implement Access Control Check.
 23. Implement Grant Access.

========================================================
example4_i-c_t-0.1.v
// 1. Implement a grant access mechanism.
// 2. Implement a grant access mechanism.
// 3. Implement a grant access mechanism.
// 4. Implement a grant access mechanism.
// 5. Implement a grant access mechanism.
// 6. Implement a grant access mechanism.
// 7. Implement a grant access mechanism.
// 8. Implement a grant access mechanism.
// 9. Implement a grant access mechanism.
// 10. Implement a grant access mechanism.
// 11. Implement a grant access mechanism.
// 12. Implement a grant access mechanism.
// 13. Implement a grant access mechanism.
// 14. Implement a grant access mechanism.
// 15. Implement a grant access mechanism.
// 16. Implement a grant access mechanism.
// 17. Implement a grant access mechanism.
// 18. Implement a grant access mechanism.
// 19. Implement a grant access mechanism.
// 20. Implement a grant access mechanism.

========================================================
example5_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Check.
 4. Implement Grant Access.
 5. Implement Access Control Check.
 6. Implement Grant Access.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Check.
 10. Implement Grant Access.
 11. Implement Access Control Check.
 12. Implement Grant Access.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Check.
 16. Implement Grant Access.
 17. Implement Access Control Check.
 18. Implement Grant Access.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Check.
 22. Implement Grant Access.
 23. Implement Access Control Check.
 24. Implement
========================================================
example6_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Revoke Access.
 4. Implement Access Control Check.
 5. Implement Access Control Check.
 6. Implement Access Control Check.
 7. Implement Access Control Check.
 8. Implement Access Control Check.
 9. Implement Access Control Check.
 10. Implement Access Control Check.
 11. Implement Access Control Check.
 12. Implement Access Control Check.
 13. Implement Access Control Check.
 14. Implement Access Control Check.
 15. Implement Access Control Check.
 16. Implement Access Control Check.
 17. Implement Access Control Check.
 18. Implement Access Control Check.
 19. Implement Access Control Check.
 20. Implement Access Control Check.
 21. Implement Access Control Check.
 22. Implement Access Control Check.
 23.
========================================================
example7_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Access Control Check in the Grant Logic.
 3. Implement Access Control Check in the Grant Logic.
 4. Implement Access Control Check in the Grant Logic.
 5. Implement Access Control Check in the Grant Logic.
 6. Implement Access Control Check in the Grant Logic.
 7. Implement Access Control Check in the Grant Logic.
 8. Implement Access Control Check in the Grant Logic.
 9. Implement Access Control Check in the Grant Logic.
 10. Implement Access Control Check in the Grant Logic.
 11. Implement Access Control Check in the Grant Logic.
 12. Implement Access Control Check in the Grant Logic.
 13. Implement Access Control Check in the Grant Logic.
 14. Implement Access Control Check in the Grant Logic.
 15. Implement Access Control Check in the Grant Logic.
 16. Implement Access Control Check in the
========================================================
example8_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Logic.
 3. Implement Access Control Check.
 4. Implement Grant Logic.
 5. Implement Access Control Check.
 6. Implement Grant Logic.
 7. Implement Access Control Check.
 8. Implement Grant Logic.
 9. Implement Access Control Check.
 10. Implement Grant Logic.
 11. Implement Access Control Check.
 12. Implement Grant Logic.
 13. Implement Access Control Check.
 14. Implement Grant Logic.
 15. Implement Access Control Check.
 16. Implement Grant Logic.
 17. Implement Access Control Check.
 18. Implement Grant Logic.
 19. Implement Access Control Check.
 20. Implement Grant Logic.
 21. Implement Access Control Check.
 22. Implement Grant Logic.
 23. Implement Access Control Check.
 24. Implement
========================================================
example9_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access mechanism.
 3. Implement Grant Access mechanism.
 4. Implement Grant Access mechanism.
 5. Implement Grant Access mechanism.
 6. Implement Grant Access mechanism.
 7. Implement Grant Access mechanism.
 8. Implement Grant Access mechanism.
 9. Implement Grant Access mechanism.
 10. Implement Grant Access mechanism.
 11. Implement Grant Access mechanism.
 12. Implement Grant Access mechanism.
 13. Implement Grant Access mechanism.
 14. Implement Grant Access mechanism.
 15. Implement Grant Access mechanism.
 16. Implement Grant Access mechanism.
 17. Implement Grant Access mechanism.
 18. Implement Grant Access mechanism.
 19. Implement Grant Access mechanism.
 20. Implement Grant Access mechanism.
 21. Implement Grant Access mechanism.
 22. Implement Grant Access mechanism.
 23
========================================================
example10_i-c_t-0.1.v
 1. Check if the user_id is valid.
 2. Check if the user has access to the asset.
 3. If the user has access, grant access.
 4. If the user does not have access, do not grant access.
 5. If the user has access, then access the data.
 6. If the user does not have access, then do not access the data.
 7. If the user has access, then return the data.
 8. If the user does not have access, then return the data.
 9. If the user has access, then return the data.
 10. If the user does not have access, then return the data.
 11. If the user has access, then return the data.
 12. If the user does not have access, then return the data.
 13. If the user has access, then return the data
========================================================
example11_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Check.
 4. Implement Grant Access.
 5. Implement Access Control Check.
 6. Implement Grant Access.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Check.
 10. Implement Grant Access.
 11. Implement Access Control Check.
 12. Implement Grant Access.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Check.
 16. Implement Grant Access.
 17. Implement Access Control Check.
 18. Implement Grant Access.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Check.
 22. Implement Grant Access.
 23. Implement Access Control Check.
 24. Implement
========================================================
example12_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Check.
 4. Implement Grant Access.
 5. Implement Access Control Check.
 6. Implement Grant Access.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Check.
 10. Implement Grant Access.
 11. Implement Access Control Check.
 12. Implement Grant Access.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Check.
 16. Implement Grant Access.
 17. Implement Access Control Check.
 18. Implement Grant Access.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Check.
 22. Implement Grant Access.
 23. Implement Access Control Check.
 24. Implement
========================================================
example13_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access mechanism.
 3. Implement Access Control mechanism.
 4. Implement Access Control mechanism.
 5. Implement Access Control mechanism.
 6. Implement Access Control mechanism.
 7. Implement Access Control mechanism.
 8. Implement Access Control mechanism.
 9. Implement Access Control mechanism.
 10. Implement Access Control mechanism.
 11. Implement Access Control mechanism.
 12. Implement Access Control mechanism.
 13. Implement Access Control mechanism.
 14. Implement Access Control mechanism.
 15. Implement Access Control mechanism.
 16. Implement Access Control mechanism.
 17. Implement Access Control mechanism.
 18. Implement Access Control mechanism.
 19. Implement Access Control mechanism.
 20. Implement Access Control mechanism.
 21. Implement Access Control mechanism.
 22. Implement Access Control mechanism.
 23
========================================================
example14_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control Check.
 4. Implement Grant Access.
 5. Implement Access Control Check.
 6. Implement Grant Access.
 7. Implement Access Control Check.
 8. Implement Grant Access.
 9. Implement Access Control Check.
 10. Implement Grant Access.
 11. Implement Access Control Check.
 12. Implement Grant Access.
 13. Implement Access Control Check.
 14. Implement Grant Access.
 15. Implement Access Control Check.
 16. Implement Grant Access.
 17. Implement Access Control Check.
 18. Implement Grant Access.
 19. Implement Access Control Check.
 20. Implement Grant Access.
 21. Implement Access Control Check.
 22. Implement Grant Access.
 23. Implement Access Control Check.
 24. Implement
========================================================
example15_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access mechanism.
 3. Implement Access Control mechanism.
 4. Implement Access Control mechanism.
 5. Implement Access Control mechanism.
 6. Implement Access Control mechanism.
 7. Implement Access Control mechanism.
 8. Implement Access Control mechanism.
 9. Implement Access Control mechanism.
 10. Implement Access Control mechanism.
 11. Implement Access Control mechanism.
 12. Implement Access Control mechanism.
 13. Implement Access Control mechanism.
 14. Implement Access Control mechanism.
 15. Implement Access Control mechanism.
 16. Implement Access Control mechanism.
 17. Implement Access Control mechanism.
 18. Implement Access Control mechanism.
 19. Implement Access Control mechanism.
 20. Implement Access Control mechanism.
 21. Implement Access Control mechanism.
 22. Implement Access Control mechanism.
 23
========================================================
example16_i-c_t-0.1.v
 1. Grant Access to a user.
 2. Check if the user is accessing the asset.
 3. If the user is accessing the asset, grant access.
 4. If the user is not accessing the asset, do not grant access.
 5. If the user is accessing the asset, return the data.
 6. If the user is not accessing the asset, return the data.
 7. If the user is accessing the asset and the data is not granted, return the data.
 8. If the user is not accessing the asset and the data is not granted, do not return the data.
 9. If the user is accessing the asset and the data is granted, return the data.
 10. If the user is not accessing the asset and the data is granted, do not return the data.
 11. If the user is accessing the asset and the data is not granted, return the
========================================================
example17_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access mechanism.
 3. Implement Access Control mechanism.
 4. Implement Access Control Check mechanism.
 5. Implement Access Control Check mechanism.
 6. Implement Access Control Check mechanism.
 7. Implement Access Control Check mechanism.
 8. Implement Access Control Check mechanism.
 9. Implement Access Control Check mechanism.
 10. Implement Access Control Check mechanism.
 11. Implement Access Control Check mechanism.
 12. Implement Access Control Check mechanism.
 13. Implement Access Control Check mechanism.
 14. Implement Access Control Check mechanism.
 15. Implement Access Control Check mechanism.
 16. Implement Access Control Check mechanism.
 17. Implement Access Control Check mechanism.
 18. Implement Access Control Check mechanism.
 19. Implement Access Control Check mechanism.
 20. Implement Access Control Check mechanism.
 21.
========================================================
example18_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Access Control Check in the Grant Logic.
 3. Implement Access Control Check in the Grant Logic.
 4. Implement Access Control Check in the Grant Logic.
 5. Implement Access Control Check in the Grant Logic.
 6. Implement Access Control Check in the Grant Logic.
 7. Implement Access Control Check in the Grant Logic.
 8. Implement Access Control Check in the Grant Logic.
 9. Implement Access Control Check in the Grant Logic.
 10. Implement Access Control Check in the Grant Logic.
 11. Implement Access Control Check in the Grant Logic.
 12. Implement Access Control Check in the Grant Logic.
 13. Implement Access Control Check in the Grant Logic.
 14. Implement Access Control Check in the Grant Logic.
 15. Implement Access Control Check in the Grant Logic.
 16. Implement Access Control Check in the
========================================================
example19_i-c_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Grant Access mechanism.
 3. Implement Access Control mechanism.
 4. Implement Access Control mechanism.
 5. Implement Access Control mechanism.
 6. Implement Access Control mechanism.
 7. Implement Access Control mechanism.
 8. Implement Access Control mechanism.
 9. Implement Access Control mechanism.
 10. Implement Access Control mechanism.
 11. Implement Access Control mechanism.
 12. Implement Access Control mechanism.
 13. Implement Access Control mechanism.
 14. Implement Access Control mechanism.
 15. Implement Access Control mechanism.
 16. Implement Access Control mechanism.
 17. Implement Access Control mechanism.
 18. Implement Access Control mechanism.
 19. Implement Access Control mechanism.
 20. Implement Access Control mechanism.
 21. Implement Access Control mechanism.
 22. Implement Access Control mechanism.
 23
========================================================
example0_i-c_t-0.3.v
 1. Implement Access Control Check.
 2. Update Grant Access Logic.
 3. Update the Output Data.
 4. Update the Grant Access Flag.
 5. Update the Grant Access Logic.
 6. Update the Access Granted Signal.
 7. Update the Output Data.
 8. Update the Grant Access Flag.
 9. Update the Grant Access Logic.
 10. Update the Access Granted Signal.
 11. Update the Output Data.
 12. Update the Grant Access Flag.
 13. Update the Grant Access Logic.
 14. Update the Access Granted Signal.
 15. Update the Output Data.
 16. Update the Grant Access Flag.
 17. Update the Grant Access Logic.
 18. Update the Access Granted Signal.
 19. Update the Output Data.
 20. Update the Grant Access Flag.
 21. Update the Grant Access
========================================================
example1_i-c_t-0.3.v
 1. Check if access is granted.
 2. If granted, then access the data.
 3. If not granted, then do not access the data.
 4. Grant access to the data only if the data is not already granted.
 5. Grant access to the data only if the data is not already granted.
 6. Do not grant access to the data if the data is already granted.
 7. Do not grant access to the data if the data is already granted.
 8. Do not grant access to the data if the data is already granted.
 9. Do not grant access to the data if the data is already granted.
 10. Do not grant access to the data if the data is already granted.
 11. Do not grant access to the data if the data is already granted.
 12. Do not grant access to the data if the data is already granted.

========================================================
example2_i-c_t-0.3.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example3_i-c_t-0.3.v
// 1. Implement Access Control Check.
// 2. Implement Grant Access Functionality.
// 3. Implement Access Control Check.
// 4. Implement Grant Access Functionality.

if (usr_id == 3'h4)
begin
	grant_access = 1'b1;
	data_out = data_in;

end

========================================================
example4_i-c_t-0.3.v
// 1) Implement Access Control Check.
// 2) Implement Grant Logic.
// 3) Implement Access Logic.

// Grant Access
// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;

// Implement Access Control Check.
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// Implement Grant Logic.
// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;

// Implement Access Logic.
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// Grant Access
// if (
========================================================
example5_i-c_t-0.3.v
// 1. Implement a grant access mechanism.
// 2. Implement a mechanism to grant access to a user.
// 3. Implement a mechanism to check if a user has access to the asset.
// 4. Implement a mechanism to check if a user has access to a certain feature.
// 5. Implement a mechanism to check if a user is allowed to access the system.
// 6. Implement a mechanism to check if a user is allowed to access a certain feature.
// 7. Implement a mechanism to check if a user is allowed to access a certain feature.
// 8. Implement a mechanism to check if a user is allowed to access a certain feature.
// 9. Implement a mechanism to check if a user is allowed to access a certain feature.
// 10. Implement a mechanism to check if a user is allowed to access a certain feature.
// 11. Implement a mechanism to check if a user is allowed to access a certain feature.

========================================================
example6_i-c_t-0.3.v
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// Grant Access
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

// Ensure that access is granted before data is accessed.
data_out = (grant_access) ? data_in : data_out;


========================================================
example7_i-c_t-0.3.v
 1. Implement Grant Access.
 2. Implement Access Control.
 3. Implement Access Control Check.
 4. Implement Access Control Check for all the outputs.
 5. Implement Access Control Check for all the inputs.
 6. Implement Access Control Check for all the inputs and outputs.
 7. Implement Access Control Check for all the inputs and outputs.
 8. Implement Access Control Check for all the inputs and outputs.
 9. Implement Access Control Check for all the inputs and outputs.
 10. Implement Access Control Check for all the inputs and outputs.
 11. Implement Access Control Check for all the inputs and outputs.
 12. Implement Access Control Check for all the inputs and outputs.
 13. Implement Access Control Check for all the inputs and outputs.
 14. Implement Access Control Check for all the inputs and outputs.
 15. Implement Access Control Check for all the inputs and outputs.
========================================================
example8_i-c_t-0.3.v
 1. Remove the grant_access variable.
 2. Replace the grant_access check with a new function that returns the
 grant_access value.
 3. Check the grant_access value before any data is accessed.
 4. Check the grant_access value after all data is accessed.
 5. Remove the grant_access check from the user_grant_access function.
 6. Remove the grant_access check from the always block.
 7. Remove the grant_access check from the for loop.
 8. Remove the grant_access check from the if statement.
 9. Remove the grant_access check from the main file.
 10. Remove the grant_access check from the test bench file.
 11. Remove the grant_access check from the test bench file.
 12. Remove the grant_access check from the test bench file.
 13. Remove the
========================================================
example9_i-c_t-0.3.v
 1. Implement grant_access as a wire.
 2. Implement grant_access as a register.
 3. Implement grant_access as a wire.
 4. Implement grant_access as a register.
 5. Implement grant_access as a wire.
 6. Implement grant_access as a register.
 7. Implement grant_access as a wire.
 8. Implement grant_access as a register.
 9. Implement grant_access as a wire.
 10. Implement grant_access as a register.
 11. Implement grant_access as a wire.
 12. Implement grant_access as a register.
 13. Implement grant_access as a wire.
 14. Implement grant_access as a register.
 15. Implement grant_access as a wire.
 16. Implement grant_access as a register.
 17. Implement grant_access as
========================================================
example10_i-c_t-0.3.v
 1. Remove the grant_access flag.
 2. Replace the above code with the following code.
 3. Check the grant_access flag before accessing the data.
 4. If the grant_access flag is true, then use the data_in value.
 5. If the grant_access flag is false, then use the data_out value.
 6. Ensure that the data_out value is not changed if the grant_access flag is false.
 7. Ensure that the data_in value is changed if the grant_access flag is true.
 8. Ensure that the data_out value is not changed if the grant_access flag is true and the data_in value is 0.
 9. Ensure that the data_out value is changed if the grant_access flag is true and the data_in value is not 0.
 10. Ensure that the data_out value is not
========================================================
example11_i-c_t-0.3.v
 1. Access Control Check Implemented After Asset is Accessed.
 2. Grant Access to the Asset Based on the ID.
 3. Grant Access to the Asset Based on the ID.
 4. Grant Access to the Asset Based on the ID.
 5. Grant Access to the Asset Based on the ID.
 6. Grant Access to the Asset Based on the ID.
 7. Grant Access to the Asset Based on the ID.
 8. Grant Access to the Asset Based on the ID.
 9. Grant Access to the Asset Based on the ID.
 10. Grant Access to the Asset Based on the ID.
 11. Grant Access to the Asset Based on the ID.
 12. Grant Access to the Asset Based on the ID.
 13. Grant Access to the Asset Based on the ID.
 14. Grant Access to the Asset Based on the ID.
 15.
========================================================
example12_i-c_t-0.3.v
 1. Grant Access to a user.
 2. Check if the user is accessing the asset.
 3. If the user is not accessing the asset, then grant access.
 4. Check if the user is requesting to access the asset.
 5. If the user is requesting access, then grant access.
 6. If the user is requesting access to the asset and the asset is already being accessed, then
 7. If the user is requesting access to the asset and the asset is not being accessed, then
 8. Grant access to the asset.
 9. If the user is requesting access to the asset and the asset is being accessed, then
 
 11. Grant access to the asset.
 12. Check if the user is requesting access to the asset.
 13. If the user is requesting access to the asset, then grant access
========================================================
example13_i-c_t-0.3.v
// 1. Implement Access Control.
// 2. Implement Grant Access.
// 3. Implement Access Control Check.
// 4. Implement Access Control Check in Grant Access.
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example14_i-c_t-0.3.v
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example15_i-c_t-0.3.v
 1. Implement Access Control Check.
 2. Implement Grant Access for the user.
 3. Implement the Grant Access as a parameter.
 4. Implement the Grant Access as a global variable.
 5. Implement the Grant Access as a wire.
 6. Implement the Grant Access as a reg.
 7. Implement the Grant Access as an always block.
 8. Implement the Grant Access as an always @(posedge clk) block.
 9. Implement the Grant Access as an always @(negedge clk) block.
 10. Implement the Grant Access as a case statement.
 11. Implement the Grant Access as a casex statement.
 12. Implement the Grant Access as a casez statement.
 13. Implement the Grant Access as a case statement.
 14. Implement the Grant Access as a casex statement.
 15. Implement the Grant Access as a
========================================================
example16_i-c_t-0.3.v
 1. Grant access is checked only for the last 3 bits of the user id.
 2. Grant access is granted only for the last 3 bits of the user id.
 3. Access is granted only for the last 3 bits of the user id.
 4. Grant access is granted only for the last 3 bits of the user id.
 5. Access is granted only for the last 3 bits of the user id.
 6. Grant access is granted only for the last 3 bits of the user id.
 7. Access is granted only for the last 3 bits of the user id.
 8. Grant access is granted only for the last 3 bits of the user id.
 9. Access is granted only for the last 3 bits of the user id.
 10. Grant access is granted only for the last 3 bits of the user id.
 11. Access is granted only for the last 3 bits of the
========================================================
example17_i-c_t-0.3.v
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// Grant access to the asset
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

// Ensure that access is granted before data is accessed.
assign data_out = (grant_access) ? data_in : data_out;


========================================================
example18_i-c_t-0.3.v
 1. Implement Access Control Check.
 2. Implement Grant Logic.
 3. Implement Grant Access.
 4. Implement Data Output Logic.
 5. Implement Access Control Logic.
 6. Implement RST and CLK.
 7. Implement ID Mapping.
 8. Implement ID Mapping Logic.
 9. Implement ID Mapping Check.
 10. Implement ID Mapping Check Logic.
 11. Implement ID Mapping Check Logic.
 12. Implement ID Mapping Check Logic.
 13. Implement ID Mapping Check Logic.
 14. Implement ID Mapping Check Logic.
 15. Implement ID Mapping Check Logic.
 16. Implement ID Mapping Check Logic.
 17. Implement ID Mapping Check Logic.
 18. Implement ID Mapping Check Logic.
 19. Implement ID Mapping Check Logic.
 20. Implement ID Mapping
========================================================
example19_i-c_t-0.3.v
 1. Add Grant Access Flag to the Data Out.
 2. Add Grant Access Flag to the Data In.
 3. Check Grant Access Flag in the Main Testbench.
 4. Check Grant Access Flag in the Access Control Testbench.
 5. Check Grant Access Flag in the Access Control Testbench.
 6. Check Grant Access Flag in the Access Control Testbench.
 7. Check Grant Access Flag in the Access Control Testbench.
 8. Check Grant Access Flag in the Access Control Testbench.
 9. Check Grant Access Flag in the Access Control Testbench.
 10. Check Grant Access Flag in the Access Control Testbench.
 11. Check Grant Access Flag in the Access Control Testbench.
 12. Check Grant Access Flag in the Access Control Testbench.
 13. Check Grant Access Flag in the Access Control Testbench.
 14. Check Grant Access Flag in the Access
========================================================
example0_i-c_t-0.5.v
// 1. Check if asset is accessed.
// 2. If asset is accessed, check if access is granted.
// 3. If access is granted, return data.
// 4. If access is not granted, return data from last update.
// 5. If no data has been stored, return 0.
data_out = (grant_access) ? data_in : data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example1_i-c_t-0.5.v
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access <= 0;
else begin
if (usr_id == 3'h4)
grant_access <= 1;
else
grant_access <= 0;

end

end

========================================================
example2_i-c_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example3_i-c_t-0.5.v
 1. Add grant_access flag to the FIFO.
 2. Add grant_access flag to the FIFO in the read and write modules.
 3. Add grant_access flag to the FIFO in the read and write modules.
 4. Add grant_access flag to the FIFO in the read and write modules.
 5. Add grant_access flag to the FIFO in the read and write modules.
 6. Add grant_access flag to the FIFO in the read and write modules.
 7. Add grant_access flag to the FIFO in the read and write modules.
 8. Add grant_access flag to the FIFO in the read and write modules.
 9. Add grant_access flag to the FIFO in the read and write modules.
 10. Add grant_access flag to the FIFO in the read and
========================================================
example4_i-c_t-0.5.v
// 1. Check if the user is the owner of the asset.
// 2. Check if the user has the rights to access the asset.
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example5_i-c_t-0.5.v
if(grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example6_i-c_t-0.5.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example7_i-c_t-0.5.v
 Once the grant is asserted, it cannot be turned off till the
 next positive edge of the clock. Hence, the grant must be
 asserted for only one clock cycle.

 Once the grant is asserted, it cannot be turned off till the
 next positive edge of the clock. Hence, the grant must be
 asserted for only one clock cycle.

 Once the grant is asserted, it cannot be turned off till the
 next positive edge of the clock. Hence, the grant must be
 asserted for only one clock cycle.

 Once the grant is asserted, it cannot be turned off till the
 next positive edge of the clock. Hence, the grant must be
 asserted for only one clock cycle.

 Once the grant is asserted, it cannot be turned off till the
 next positive edge of the clock. Hence, the grant must be
 asserted for only one clock
========================================================
example8_i-c_t-0.5.v
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example9_i-c_t-0.5.v
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access <= 1'b0;
else if (usr_id == 3'h4)
grant_access <= 1'b1;
else
grant_access <= 1'b0;

end

========================================================
example10_i-c_t-0.5.v
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
assign grant_access = 1'b0;
else if (usr_id == 3'h4)
assign grant_access = 1'b1;
else
assign grant_access = 1'b0;

end

========================================================
example11_i-c_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example12_i-c_t-0.5.v
// Allow all users to access the asset and then use AND to grant access.
data_out = (grant_access) ? data_in : data_out;

========================================================
example13_i-c_t-0.5.v
// Always try to grant access, but if the access is already granted,
// do not grant it again until it is revoked.
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access <= 0;
else if (usr_id == 3'd4)
grant_access <= 1'b1;
else
grant_access <= 1'b0;

end

========================================================
example14_i-c_t-0.5.v
// 1. Use a flip flop to store the grant access value.
// 2. Check that the user trying to access the asset is the same
// as the one granted access.
// 3. Grant access for a user if the user id is 4'h4.
// 4. Revoke access for a user if the user id is 4'h3.
// 5. Cache the last granted access.
// 6. Use the grant access as an input into the data_out.

// BUG: In Simulation, The Grant Access Flip Flop Stays High.
// This is because the simulation starts at time 0, so the flip flop is always
// set to 1 at time 0.
// The grant_access flip flop should be set to 0 at time 0, then set to 1
// after the first clock cycle.

// BUG: The Grant Access Flip Flop Should Not Change Value On Clock
========================================================
example15_i-c_t-0.5.v
// 1. Check if grant access is asserted
// 2. Check if the user is requesting access
// 3. Check if the user is requesting access that is already granted
// 4. Check if the user is requesting access that is not granted
// 5. Check if the user is requesting access that is not granted

========================================================
example16_i-c_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example17_i-c_t-0.5.v
// 1. Implement Access Control for each asset.
// 2. Grant access to each user based on the user id.
// 3. Implement Access Control Check for each user based on the user id.

========================================================
example18_i-c_t-0.5.v
// In this case, data_out is always 0.
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example19_i-c_t-0.5.v
grant_access = 1'b0;

========================================================
example0_i-c_t-0.7.v
// 1. Implement an access granted flag.
// 2. Fix grant_access statement.
// 3. Implement an access grant arbiter.

========================================================
example1_i-c_t-0.7.v
// 1. Inhibit granting access to other users until asset is accessed.
// 2. Grant access for the current user after asset is activated.
if (grant_access == 1'b1)
data_out = data_in;
else
data_out = data_out;

========================================================
example2_i-c_t-0.7.v
 - Ensure that access is granted before data is accessed.
 - Ensure that no write access is granted to asset 4.
 - Ensure that no read access is granted to asset 3.
 - Ensure that only the owner of an asset can access it.
 - Ensure that an asset is not written to until the grant is obtained.
 - Ensure that an asset is not read from until the grant is obtained.
 - Ensure that an asset is not deleted until the grant is obtained.
 - Ensure that an asset is not created unless the grant is obtained.
 - Ensure that an asset is not modified unless the grant is obtained.
 - Ensure that an asset is not shared unless the grant is obtained.
 - Ensure that an asset is not a replication unless the grant is obtained.
 - Ensure that an asset is not a local backup unless the grant is obtained.
 - Ensure that an asset is not a global backup
========================================================
example3_i-c_t-0.7.v
assign data_out = ((usr_id == 3'h4) && grant_access) ? data_in : (grant_access) ? data_out : 8'b0;
//assign data_out = (grant_access) ? data_in : data_out;

========================================================
example4_i-c_t-0.7.v
 grant_access = ((usr_id > 3'h3) & (usr_id < 3'h4)) ? 1'b1 : 1'b0;
  The above check is incorrect since it does not cover all the usr_id's
  Grant access for all the usr_id's
  except the last one, usr_id = 4'b1111
  so we will manually grant access for the last one here
 grant_access = ((usr_id == 4'b1111) & (usr_f == 1'b1)) ? 1'b1 : 1'b0;
  Here we will check if the user for whom we are granting access exists
  or not. If it does then we will grant access to it.
 grant_access = ((usr_id > 4'b0111) & (usr_f == 1'b1
========================================================
example5_i-c_t-0.7.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example6_i-c_t-0.7.v
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access <= 1'b0;
else if (usr_id == 3'h4)
grant_access <= 1'b1;
else
grant_access <= 1'b0;

end

========================================================
example7_i-c_t-0.7.v
if (grant_access && (usr_id == 3'h4))

assign data_out = data_in;
else

assign data_out = data_out;


========================================================
example8_i-c_t-0.7.v

========================================================
example9_i-c_t-0.7.v
// Allow user 3 to write data to the memory.
if (usr_id == 3'h4)
data_out = data_in;

========================================================
example10_i-c_t-0.7.v
// Grant access bit is set to indicate that data is being accessed.
// The output is only updated to the value of the data when the
// grant access is true, and unaltered by the output otherwise.
data_out = data_in;
grant_access = 1'b1;

========================================================
example11_i-c_t-0.7.v
// data_out = (grant_access && usr_id == 3'h4) ? data_in : data_out;

// NOTE: Replaced lines above with lines below that are commented out.
data_out = (usr_id == 3'h4 && grant_access) ? data_in : data_out;
// Ensure that access is granted before data is accessed.
// FIX:
// data_out = (usr_id == 3'h4 && grant_access) ? data_in : data_out;

========================================================
example12_i-c_t-0.7.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example13_i-c_t-0.7.v
if (grant_access)
data_out = data_in;

========================================================
example14_i-c_t-0.7.v
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example15_i-c_t-0.7.v
data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example16_i-c_t-0.7.v
// 1. Implement grant_access flag.
// 2. Implement new module with Access Control Check.
// Grant access based on user ID.

========================================================
example17_i-c_t-0.7.v
always @(posedge clk or negedge rst_n)
begin
if(!rst_n)
begin
grant_access <= 0;

end

end

========================================================
example18_i-c_t-0.7.v
// Ensure that access is granted before data is accessed.
// Otherwise, retain previous value.
// data_out = (usr_id == 3'h4) ? data_in : data_out;
// granted_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

// Ensure that access is granted before data is accessed.
// Otherwise, retain previous value.
// data_out = (grant_access) ? data_in : data_out;

// Ensure that access is granted before data is accessed.
// Otherwise, retain previous value.
// data_out = (grant_access) ? data_in : data_out;

// Ensure that access is granted before data is accessed.
// Otherwise, retain previous value.
// data_out = (grant_access) ? data_in : data_out;

//
========================================================
example19_i-c_t-0.7.v
// If a user tries to access an asset, but does not have access,
// the data_in is written to data_out.
// This would work, but I would like to display the message
// that the user does not have access to the selected asset.
// I think it will be easier to understand if the user does not
// have access to the selected asset.


data_out = (usr_id == 3'h4) ? data_in : 8'bz;


========================================================
example0_i-c_t-0.9.v

========================================================
example1_i-c_t-0.9.v
// update grant_access when appropriate.
data_out = (grant_access) ? data_in : data_out;
//update grant_access when appropriate.
updata grant_access;
//00 : no access granted.
//01 : access granted;

========================================================
example2_i-c_t-0.9.v
assign logic_output = (usr_id == 3'h4)? 1'b1 : 1'b0;
data_out = (logic_output) ? data_in : data_out;
/*assign granted = (usr_id == 3'h4) ? 1'b1 : 1'b0;
assign data_out = (granted) ? data_in : data_out;
assign grant = (usr_id == 3'h4) ? 1'b1 : 1'b0;
assign grant_access = (grant) ? 1'b1 : 1'b0;*/

========================================================
example3_i-c_t-0.9.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example4_i-c_t-0.9.v
// Recipe
// 1. Investigate scope and order of intialisations.
// 2. Check if its possible to access the same asset from multiple users at the same time.

========================================================
example5_i-c_t-0.9.v
grant_access = 1'b0;
data_out = data_in;
//if (grant_access)
//	data_out = data_in;
//else
//	data_out = data_out;

========================================================
example6_i-c_t-0.9.v
// WE rst_n for the non-greeper users to avoid
//an operation on a non-granted resource.
scriblusr_id = usr_id;
get_user_data(data_out, usr_id);
// Test Logic
// if (user_id == 4'h3)
// scriblusr_id = 3'h4;
if (usr_id == 3'h4)
scriblusr_id = 3'h4;
else
scriblusr_id = 3'h3;

========================================================
example7_i-c_t-0.9.v
// Grant access to that particular asset.
// Give access to the whole of the system. TEMP SET TO CORRECT ASSIGNMENT.
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;


========================================================
example8_i-c_t-0.9.v
data_out <= (grant_access) ? data_in : 8'b00000000;

========================================================
example9_i-c_t-0.9.v
//wire checkOp = (usr_id >= 4'h1) & (usr_id <= 4'h4);
//if (grant_access & checkOp)
//data_out = data_in;

always @ (usr_id) begin
case(usr_id)
3'h0 : data_out = data_in;
3'h1 : data_out = data_in;
3'h2 : data_out = data_in;
3'h3 : data_out = data_in;
3'h4 : data_out = data_in;
3'h5 : /* do nothing */;
3'h6 : /* do nothing */;

end

========================================================
example10_i-c_t-0.9.v
data_out <= grant_access ? data_in : data_out;
// data_out <= (usr_id == 4'h4) ? data_in : data_out;

========================================================
example11_i-c_t-0.9.v
// IF (grant_access)
// ALSO FOLLOW PREVIOUS ASSIGNMENT
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example12_i-c_t-0.9.v
// if (grant_access)
// unanimous decision
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example13_i-c_t-0.9.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example14_i-c_t-0.9.v

assign data_out = (usr_id == 3'h4 && grant_access) ? data_in : data_out;


========================================================
example15_i-c_t-0.9.v
// 1. Add support for Secret Access Key.
// 2. After Secret Access Key is enabled, check against both User ID and Secret Access Key.
// 3. When Secret Access Key match, grant access.

always @ (usr_id)
case(usr_id)
3'h1: grant_access = 1'b1;
default: grant_access = 1'b0;

========================================================
example16_i-c_t-0.9.v
data_out = grant_access ? data_in : data_out;

========================================================
example17_i-c_t-0.9.v
if (grant_access==1'b1 && usr_id == 3'h4)
usercontent data_out = data_in;

else
 data_out = data_out;
// grant access to the asset if and only if the same user id
// is trying to access the asset
//assign grant_access = (usr_id == 3'h4) ? 1'b1: 1'b0;

========================================================
example18_i-c_t-0.9.v
if (grant_access == 1'd0)
data_out = data_out;
else
data_out = data_in;
//data_out = (usr_id == 3'h4) ? 8'b11111111 : data_out;

========================================================
example19_i-c_t-0.9.v
// Exchange data_out for data_in and permit asset access to the output only.



========================================================
example0_i-d_t-0.1.v
// 1. Check if the user_id is correct.
// 2. Check if the user has access to the asset.
// 3. If the user has access, then grant access and assign the data_in to the data_out.
// 4. If the user does not have access, then retain the previous value of data_out.
// 5. Check if the user_id is correct.
// 6. Check if the user has access to the asset.
// 7. If the user has access, then grant access and assign the data_in to the data_out.
// 8. If the user does not have access, then retain the previous value of data_out.
// 9. Check if the user_id is correct.
// 10. Check if the user has access to the asset.
// 11. If the user has access, then grant access and assign the data_in to the data_out.

========================================================
example1_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then assign the data to the output.
 4. If the user does not have access, then retain the previous value of the output.
 5. Check if the user_id is correct.
 6. Check if the user has access to the asset.
 7. If the user has access, then assign the data to the output.
 8. If the user does not have access, then retain the previous value of the output.
 9. Check if the user_id is correct.
 10. Check if the user has access to the asset.
 11. If the user has access, then assign the data to the output.
 12. If the user does not have access, then retain the previous value of the output.
 13
========================================================
example2_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then set the grant access to 1.
 4. If the user does not have access, then set the grant access to 0.
 5. Assign the data to the register.
 6. If the user_id is not correct, then do not grant access.
 7. If the user does not have access, then do not write the data.
 8. If the user has access, then write the data.
 9. If the user_id is correct, then grant access.
 10. If the user has access, then write the data.
 11. If the user does not have access, then do not write the data.
 12. If the user_id is not correct, then do not grant access.

========================================================
example3_i-d_t-0.1.v
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;

// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;

// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// if (usr_id == 3'h4)
// grant_access = 1'b1;
========================================================
example4_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then assign the data to the output.
 4. If the user does not have access, then retain the previous value of the output.
 5. Check if the user_id is correct.
 6. Check if the user has access to the asset.
 7. If the user has access, then assign the data to the output.
 8. If the user does not have access, then retain the previous value of the output.
 9. Check if the user_id is correct.
 10. Check if the user has access to the asset.
 11. If the user has access, then assign the data to the output.
 12. If the user does not have access, then retain the previous value of the output.
 13
========================================================
example5_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user_id is correct.
 3. Check if the user_id is correct.
 4. Check if the user_id is correct.
 5. Check if the user_id is correct.
 6. Check if the user_id is correct.
 7. Check if the user_id is correct.
 8. Check if the user_id is correct.
 9. Check if the user_id is correct.
 10. Check if the user_id is correct.
 11. Check if the user_id is correct.
 12. Check if the user_id is correct.
 13. Check if the user_id is correct.
 14. Check if the user_id is correct.
 15. Check if the user_id is correct.
 16. Check if
========================================================
example6_i-d_t-0.1.v
 1. Check if access is asserted.
 2. If access is asserted, then assign data to output.
 3. If access is not asserted, then retain previous value of output.
 4. Check if output is being written to while access is not being asserted.
 5. If output is being written to, then retain previous value.
 6. If output is not being written to, then assign data_in to output.
 7. Check if output is being written to while access is not being asserted.
 8. If output is being written to, then retain previous value.
 9. If output is not being written to, then retain previous value of output.
 10. Check if output is being written to while access is not being asserted.
 11. If output is being written to, then retain previous value.
 12. If output is not being written to, then retain previous value of output
========================================================
example7_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then return the data_in.
 4. If the user does not have access, then return the data_out.
 5. If the user_id is not correct, then return the data_out.
 6. If the user has access, then assign the data_in to the data_out.
 7. If the user does not have access, then do not write to the data_out.
 8. If the user_id is not correct, then do not write to the data_out.
 9. If the user does not have access, then do not read from the data_in.
 10. If the user_id is not correct, then do not read from the data_in.
 11. If the
========================================================
example8_i-d_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Access Control Grant.
 3. Implement Access Control Check for all the inputs.
 4. Implement Access Control Grant.
 5. Implement Access Control Check for all the outputs.
 6. Implement Access Control Grant.
 7. Implement Access Control Check for all the registers.
 8. Implement Access Control Grant.
 9. Implement Access Control Check for all the registers.
 10. Implement Access Control Grant.
 11. Implement Access Control Check for all the registers.
 12. Implement Access Control Grant.
 13. Implement Access Control Check for all the registers.
 14. Implement Access Control Grant.
 15. Implement Access Control Check for all the registers.
 16. Implement Access Control Grant.
 17. Implement Access Control Check for all the registers.
 18. Implement Access Control Grant.
 19. Implement Access Control
========================================================
example9_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then set the grant access to 1.
 4. If the user does not have access, then set the grant access to 0.
 5. Assign the data to the register.
 6. If the user_id is not correct, then do not grant access.
 7. If the user does not have access, then do not write the data to the register.
 8. If the user has access, then write the data to the register.
 9. If the user_id is not correct, then do not grant access.
 10. If the user does not have access, then do not write the data to the register.
 11. If the user has access, then write the data to the register.
 12. If the
========================================================
example10_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then assign the data to the output.
 4. If the user does not have access, then retain the previous value of the output.
 5. Check if the user_id is correct.
 6. Check if the user has access to the asset.
 7. If the user has access, then assign the data to the output.
 8. If the user does not have access, then retain the previous value of the output.
 9. Check if the user_id is correct.
 10. Check if the user has access to the asset.
 11. If the user has access, then assign the data to the output.
 12. If the user does not have access, then retain the previous value of the output.
 13
========================================================
example11_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then allow the data_in to be written to the register.
 4. If the user does not have access, then keep the previous value of the register.
 5. If the user_id is not correct, then keep the previous value of the register.
 6. Keep the output of the register same as the input.
 7. Keep the previous value of the register if the user does not have access.
 8. Keep the previous value of the register if the user_id is not correct.
 9. Keep the previous value of the register if the user does not have access.
 10. Keep the previous value of the register if the user_id is not correct.
 11. Keep the previous value of the register if the user does
========================================================
example12_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then return the data_in.
 4. If the user does not have access, then return the data_out.
 5. If the user_id is not correct, then return the data_out.
 6. If the user has access, then assign the data_in to the register.
 7. If the user does not have access, then do not write to the register.
 8. If the user_id is not correct, then do not write to the register.
 9. If the user does not have access, then do not read from the register.
 10. If the user_id is not correct, then do not read from the register.
 11. If the user has access, then increment the count in the
========================================================
example13_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then set the grant access to 1.
 4. If the user does not have access, then set the grant access to 0.
 5. Assign the data to the register.
 6. If the user_id is not correct, then do not grant access.
 7. If the user does not have access, then do not write the data.
 8. If the user has access, then write the data.
 9. If the user_id is not correct, then do not grant access.
 10. If the user does not have access, then do not write the data.
 11. If the user has access, then write the data.
 12. If the user_id is not correct, then do not grant access
========================================================
example14_i-d_t-0.1.v
// 1. Access Control Check Implemented After Asset is Accessed.
// 2. Grant Access to the correct user.
// 3. Grant Access to the correct register.
// 4. Grant Access to the correct data.
// 5. Do not grant access to the register if the user does not have access.
// 6. Do not grant access to the data if the user does not have access.
// 7. Do not grant access to the register if the user does not have access.
// 8. Do not grant access to the data if the user does not have access.
// 9. Do not grant access to the register if the user does not have access.
// 10. Do not grant access to the data if the user does not have access.
// 11. Do not grant access to the register if the user does not have access.
// 12. Do not grant access to the data if the user does not have access.

========================================================
example15_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then allow the data_in to be written to the register.
 4. If the user does not have access, then keep the previous value of the register.
 5. When the user_id is asserted, then check if the user has access to the asset.
 6. If the user has access, then allow the data_in to be written to the register.
 7. If the user does not have access, then keep the previous value of the register.
 8. When the user_id is de-asserted, then check if the user has access to the asset.
 9. If the user has access, then allow the data_in to be written to the register.
 10. If the user does not have access, then keep
========================================================
example16_i-d_t-0.1.v
 1. Implement Access Control Check.
 2. Implement Access Control Grant.
 3. Implement Access Control Check for all the registers.
 4. Implement Access Control Grant for all the registers.
 5. Implement Access Control Check for all the memory locations.
 6. Implement Access Control Grant for all the memory locations.
 7. Implement Access Control Check for all the peripherals.
 8. Implement Access Control Grant for all the peripherals.
 9. Implement Access Control Check for all the peripherals.
 10. Implement Access Control Grant for all the peripherals.
 11. Implement Access Control Check for all the peripherals.
 12. Implement Access Control Grant for all the peripherals.
 13. Implement Access Control Check for all the peripherals.
 14. Implement Access Control Grant for all the peripherals.
 15. Implement Access Control Check for all the peripherals.
 16
========================================================
example17_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then assign the data to the output.
 4. If the user does not have access, then retain the previous value of the output.
 5. Check if the user_id is correct.
 6. Check if the user has access to the asset.
 7. If the user has access, then assign the data to the output.
 8. If the user does not have access, then retain the previous value of the output.
 9. Check if the user_id is correct.
 10. Check if the user has access to the asset.
 11. If the user has access, then assign the data to the output.
 12. If the user does not have access, then retain the previous value of the output.
 13
========================================================
example18_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user_id is correct.
 3. Check if the user_id is correct.
 4. Check if the user_id is correct.
 5. Check if the user_id is correct.
 6. Check if the user_id is correct.
 7. Check if the user_id is correct.
 8. Check if the user_id is correct.
 9. Check if the user_id is correct.
 10. Check if the user_id is correct.
 11. Check if the user_id is correct.
 12. Check if the user_id is correct.
 13. Check if the user_id is correct.
 14. Check if the user_id is correct.
 15. Check if the user_id is correct.
 16. Check if
========================================================
example19_i-d_t-0.1.v
 1. Check if the user_id is correct.
 2. Check if the user has access to the asset.
 3. If the user has access, then return the data_in.
 4. If the user does not have access, then return the data_out.
 5. If the user_id is not correct, then return the data_out.
 6. If the user has access, then assign the data_in to the register.
 7. If the user does not have access, then do not write to the register.
 8. If the user_id is not correct, then do not write to the register.
 9. If the user does not have access, then return the data_out.
 10. If the user_id is correct, then return the data_in.
 11. If the user has access, then assign the data_in to the register
========================================================
example0_i-d_t-0.3.v
 1. Write a new grant access function
 2. Write a new function to assert access
 3. Write a new function to de-assert access
 4. Write a new function to read from the register
 5. Write a new function to write to the register
 6. Write a new function to read from the register
 7. Write a new function to write to the register
 8. Write a new function to read from the register
 9. Write a new function to write to the register
 10. Write a new function to read from the register
 11. Write a new function to write to the register
 12. Write a new function to read from the register
 13. Write a new function to write to the register
 14. Write a new function to read from the register
 15. Write a new function to write to the register
 16. Write a new function to read from
========================================================
example1_i-d_t-0.3.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example2_i-d_t-0.3.v
// 1. Check if grant_access is asserted.
// 2. Check if data_in is asserted.
// 3. Check if data_out is asserted.
// 4. Check if the current user id is 3'h4.
// 5. Assert access if all the checks are true.
// 6. Assign data_out to data_in if access is asserted.

if (usr_id == 3'h4)
begin
grant_access = 1'b1;
data_out = data_in;

end

========================================================
example3_i-d_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example4_i-d_t-0.3.v
 1. Implement Access Control Check.
 2. Implement Grant Access.
 3. Implement Access Control.
 4. Implement Grant Access.
 5. Implement Access Control.
 6. Implement Grant Access.
 7. Implement Access Control.
 8. Implement Grant Access.
 9. Implement Access Control.
 10. Implement Grant Access.
 11. Implement Access Control.
 12. Implement Grant Access.
 13. Implement Access Control.
 14. Implement Grant Access.
 15. Implement Access Control.
 16. Implement Grant Access.
 17. Implement Access Control.
 18. Implement Grant Access.
 19. Implement Access Control.
 20. Implement Grant Access.
 21. Implement Access Control.
 22. Implement Grant Access.
 23. Implement Access Control.
 24. Implement Grant Access.
 25. Implement Access Control.
========================================================
example5_i-d_t-0.3.v
 1. Write a new module for access control.
 2. Implement a new module for the grant access.
 3. Check if the user id is valid.
 4. Check if the user id is 3'h4.
 5. Assert access control only if the user id is 3'h4.
 6. Assign the data only if the access is asserted.
 7. Implement a new module for the grant access.
 8. Implement a new module for the grant access.
 9. Implement a new module for the grant access.
 10. Implement a new module for the grant access.
 11. Implement a new module for the grant access.
 12. Implement a new module for the grant access.
 13. Implement a new module for the grant access.
 14. Implement a new module for the grant access.
 15. Implement a new module for the grant
========================================================
example6_i-d_t-0.3.v
if (usr_id == 3'h4)
assign grant_access = 1'b1;
else
assign grant_access = 1'b0;

if (grant_access)
data_out = data_in;

========================================================
example7_i-d_t-0.3.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example8_i-d_t-0.3.v
// if (usr_id == 3'h4)
// assign grant_access = 1'b1;
// else
// assign grant_access = 1'b0;
// if (grant_access)
// assign data_out = data_in;
// else
// assign data_out = data_out;

========================================================
example9_i-d_t-0.3.v
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

========================================================
example10_i-d_t-0.3.v
if (grant_access)
data_out = data_in;

========================================================
example11_i-d_t-0.3.v
 1. Implement Access Control.
 2. Implement Access Control Check.
 3. Implement Access Control Check.
 4. Implement Access Control Check.
 5. Implement Access Control Check.
 6. Implement Access Control Check.
 7. Implement Access Control Check.
 8. Implement Access Control Check.
 9. Implement Access Control Check.
 10. Implement Access Control Check.
 11. Implement Access Control Check.
 12. Implement Access Control Check.
 13. Implement Access Control Check.
 14. Implement Access Control Check.
 15. Implement Access Control Check.
 16. Implement Access Control Check.
 17. Implement Access Control Check.
 18. Implement Access Control Check.
 19. Implement Access Control Check.
 20. Implement Access Control Check.
 21. Implement Access Control Check.
 22. Implement Access Control Check.
 23.
========================================================
example12_i-d_t-0.3.v
 1. Check if grant_access is asserted.
 2. Check if the id is correct.
 3. Check if the data_in is not already stored in the register.
 4. Check if the data_out is not already stored in the register.
 5. Assign data_out to the register only when all above checks are passed.
 6. Assign data_in to the register only when all above checks are passed.
 7. Do not allow the register to store data_in if the above checks are failed.
 8. Do not allow the register to store data_out if the above checks are failed.
 9. Do not allow the register to store data_in if the above checks are failed.
 10. Do not allow the register to store data_out if the above checks are failed.
 11. Do not allow the register to store data_in if the above checks
========================================================
example13_i-d_t-0.3.v
 1. Access Control Check Implemented After Asset is Accessed.
 2. Access granted to the correct user.
 3. Access granted to the correct register.
 4. Access granted to the correct data.
 5. Access granted to the correct clock.
 6. Access granted to the correct reset.
 7. Access granted to the correct input.
 8. Access granted to the correct input.
 9. Access granted to the correct input.
 10. Access granted to the correct input.
 11. Access granted to the correct input.
 12. Access granted to the correct input.
 13. Access granted to the correct input.
 14. Access granted to the correct input.
 15. Access granted to the correct input.
 16. Access granted to the correct input.
 17. Access granted to the correct input.
 18. Access granted to the correct input
========================================================
example14_i-d_t-0.3.v
 1. Check if grant_access is asserted.
 2. Check if data_in is asserted.
 3. Check if data_out is asserted.
 4. Check if the current user_id is 3h4.
 5. Check if the current user_id is 3h2.
 6. Check if the current user_id is 3h1.
 7. Check if the current user_id is 3h0.
 8. Check if the current user_id is 3h3.
 9. Check if the current user_id is 3h5.
 10. Check if the current user_id is 3h6.
 11. Check if the current user_id is 3h7.
 12. Check if the current user_id is 3h8.
 13. Check if the current user_id is 3h9.
 14. Check
========================================================
example15_i-d_t-0.3.v

========================================================
example16_i-d_t-0.3.v
// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;

// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;

data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example17_i-d_t-0.3.v
data_out = (grant_access) ? data_in : data_out;

========================================================
example18_i-d_t-0.3.v
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access <= 1'b0;
else if (usr_id == 3'h4)
grant_access <= 1'b1;
else
grant_access <= 1'b0;

end

========================================================
example19_i-d_t-0.3.v
// 1. Check if the user_id is valid.
// 2. Check if the user has access to the asset.
// 3. If the user has access to the asset, then allow the access.
// 4. If the user does not have access, then block the access.

// Grant access to the user.
// if (usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;

// if (grant_access)
// data_out = data_in;
// else
// data_out = data_out;


// Grant access to the user.
if (usr_id == 3'h4)
grant_access = 1'b1;
else
grant_access = 1'b0;

if (grant_access)
data_out =
========================================================
example0_i-d_t-0.5.v
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
always @ (posedge clk or negedge rst_n)
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example1_i-d_t-0.5.v
if (usr_id == 3'h4)
begin
grant_access = 1'b1;
data_out = data_in;

end

========================================================
example2_i-d_t-0.5.v

========================================================
example3_i-d_t-0.5.v
// 1. Grant Access to Current User.
// 2. Access Control Check on Grant.
// 3. Access to the register is granted only to the user with the access.

assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;


========================================================
example4_i-d_t-0.5.v
// if(usr_id == 3'h4)
// grant_access = 1'b1;
// else
// grant_access = 1'b0;
// if(grant_access == 1)
// data_out = data_in;
// else
// data_out = data_out;

========================================================
example5_i-d_t-0.5.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;

========================================================
example6_i-d_t-0.5.v
// accept as input only when access is granted
// if (usr_id == 3'h4 && grant_access)
// data_out = data_in;

========================================================
example7_i-d_t-0.5.v
if (grant_access == 1'b1)
data_out = data_in;

========================================================
example8_i-d_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example9_i-d_t-0.5.v
// assign data_out = (grant_access) ? data_in : data_out;
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example10_i-d_t-0.5.v
 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1
========================================================
example11_i-d_t-0.5.v
if (usr_id == 3'h4)
begin
data_out = data_in;
grant_access = 1'b1;

end

========================================================
example12_i-d_t-0.5.v
 1. Check if the user_id is proper.
 2. Check if the access is granted.
 3. If access is granted, then set the data_out.
 4. If access is not granted, then maintain the previous value of data_out.
 5. If access is asserted, then maintain the previous value of data_out.
 6. If access is not asserted, then do not maintain the previous value of data_out.
 7. Grant access when the user_id is 3'h4.
 8. Revoke access when the user_id is 3'h3.
 9. Revoke access when the user_id is 3'h2.
 10. Revoke access when the user_id is 3'h1.
 11. Revoke access when the user_id is 3'h0.
 12. Do not grant access when the user
========================================================
example13_i-d_t-0.5.v
// 1. Can't have a combinational always block inside a sequential always block.
// 2. Can't have multiple always blocks inside same always block.
// 3. Can't assign a wire to a reg if it is inside an always block.
// 4. Can't have a combinational always block inside a sequential always block.
// 5. Can only have a combinational always block inside a combinational always block.
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
grant_access = 1'b0;
else if (usr_id == 3'h4)
grant_access = 1'b1;
else
grant_access = 1'b0;

end

========================================================
example14_i-d_t-0.5.v
if (usr_id == 3'h4)
data_out = data_in;
else
data_out = data_out;


========================================================
example15_i-d_t-0.5.v
data_out = (usr_id == 3'h4) ? data_in : data_out;
grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example16_i-d_t-0.5.v
//data_out = (grant_access & usr_id == 3'h4) ? data_in : data_out;
data_out = (grant_access) ? data_in : data_out;

========================================================
example17_i-d_t-0.5.v
 1. Remove the grant_access variable
 2. Make the grant_access variable a parameter
 3. Remove the else statement
 4. Add a case for the else statement
 5. Check if the user_id is 3'h4
 6. Check if the user_id is 3'h3
 7. Check if the user_id is 3'h2
 8. Check if the user_id is 3'h1
 9. Check if the user_id is 3'h0
 10. Check if the user_id is 3'h5
 11. Check if the user_id is 3'h6
 12. Check if the user_id is 3'h7
 13. Check if the user_id is 3'h8
 14. Check if the user_id is 3'h9
 15. Check if the user_id
========================================================
example18_i-d_t-0.5.v
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example19_i-d_t-0.5.v
// 1. Grant access to a user only if that user has previously been granted access.
// 2. Once a user is granted access, do not allow that user to be granted access again.
// 3. Once a user is granted access, do not allow that user to be revoked access.
// 4. Revoke access when user id is 3h4.
// grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example0_i-d_t-0.7.v


========================================================
example1_i-d_t-0.7.v
// 1. Use a reg for granted access.
// 2. Use a case statement for assigning data to the register.
// 3. Check granted access before granting.



========================================================
example2_i-d_t-0.7.v
// assign data_out = (grant_access && usr_id == 3'h4) ? data_in : data_out;
// FIX:
// 08/06/2021: Added Debounce circuit to fix rate at which the grant gets asserted.
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example3_i-d_t-0.7.v
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example4_i-d_t-0.7.v
// Assigning data to output register when the id is correct and access is granted. 
if (grant_access)
� data_out = data_in;

========================================================
example5_i-d_t-0.7.v
// DEBUG: Writing Back Data to Register is Not Accessible.
assign data_out = (usr_id == 3'h4) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example6_i-d_t-0.7.v
if (grant_access)
�ndata_out = data_in;
else
�ndata_out = data_out;

========================================================
example7_i-d_t-0.7.v
 1. Add Access_Granted. 
 2. Check for id_error. 
 3. Check for fork_error. 
 4. Check for join_error. 
 5. Check for kmap_error. 
 6. Check for vmap_error. 
 7. Check for write_complete_error. 
 8. Check for read_complete_error. 
 9. Check for start_error. 
 10. Check for complete_error. 
 11. Check for invalid_operation_error. 
 12. Check for illegal_access_error. 
 13. Check for illegal_instruction_error. 
 14. Check for break_error. 
 15. Check for syscall_error. 
 16. Check for trap_error. 
 17. Check for system_call_
========================================================
example8_i-d_t-0.7.v
 The next condition is true when the correct id is asserted.
 In the past, the next condition was asserted when a grant was made.
 This is not true, the register should be updated on every clock cycle.
 So, when the grant is asserted, the register should be updated to the input data.
 This can be done by taking the next statement in the "always" statement
 and changing the condition to !grant_access.
 Grant access is given when it is asserted.
 The data_in is the output of the last data_out.
 So, if a data_in is asserted by a user_id, the data_out should be updated by the
 data_in.
 The grant_access is a register that keeps track of 
 which user_id has access to the asset.
 It is set true when a grant is made and set to false if the user
========================================================
example9_i-d_t-0.7.v
assign data_out = (!grant_access) ? data_out : data_in;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example10_i-d_t-0.7.v
if (usr_id == 3'h4)
	grant_access = 1'b1;
else
	grant_access = 1'b0;

assign data_out = (grant_access) ? data_in : data_out;


========================================================
example11_i-d_t-0.7.v

========================================================
example12_i-d_t-0.7.v
if (grant_access)
�Ž����data_out = data_in;

========================================================
example13_i-d_t-0.7.v
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
assign data_out = (grant_access) ? data_in : data_out;

========================================================
example14_i-d_t-0.7.v
// assign data_out = (grant_access) ? data_in : data_out;
assign data_out = grant_access ? data_in : data_out;
// assign data_out = (usr_id == 4'h4) ? data_in : data_out;

========================================================
example15_i-d_t-0.7.v
// A: Give a grant only to one user at a time.
// B: Assert grant only if user id is correct.
// C: Give data output if access is granted.
// D: Do not generate an output if access is not granted.
// e: Input the shift register to get the output.
// f: Assert access only if value is equal to 1.
assign data_out = grant_access ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example16_i-d_t-0.7.v

========================================================
example17_i-d_t-0.7.v
if (grant_access)
�/usr_id
assign data_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example18_i-d_t-0.7.v
if(usr_id == 3'h4)
begin
if(grant_access)
begin
data_out <= data_in;
grant_access <= 1'b1;

end

end

========================================================
example19_i-d_t-0.7.v
assign granting = (usr_id == 3'h4) ? 1'b1 : 1'b0;
assign data_out = (grant_access & granting) ? data_in : data_out;

========================================================
example0_i-d_t-0.9.v
case (usr_id)
// Delaying grant access to allow flops to calculate data_out
2'b11: grant_access = 1'b1;
2'b10: grant_access = 1'b0;
default: grant_access = 1'b1;

========================================================
example1_i-d_t-0.9.v
if ((usr_id == 3'h4) && (grant_access == 1'b1))
//System under test: Pass authentication information from DEC.
begin
data_out = data_in;
grant_access = 1'b1;

end

========================================================
example2_i-d_t-0.9.v
 les than user_id 4 has access to asset 3 (coded in line 95)
 les than user_id 4 has access to asset 0 (coded in line 138)
 les than user_id 4 has access to asset 1 (coded in line 123)
 les than user_id 4 has access to asset 2 (coded in line 157) 
 les than user_id 4 has access to asset 3 (coded in line 95)
 les than user_id 4 has access to asset 1 (coded in line 123)
 les than user_id 4 has access to asset 2 (coded in line 157)
 les than user_id 4 has access to asset 3 (coded in line 95)
 les than user_id 4 has access to asset 1 (coded in line 123)
 les than user_id 4 has access to asset 2 (coded in line 157)
 les than user_id 4 has access
========================================================
example3_i-d_t-0.9.v
reg[7:0] data_out;
always @*
begin
case (usr_id)
3'h0 : grant_access = 1'b0;
3'h2 : 
begin
grant_access = 1'b1;
data_out = data_in;

end

end

========================================================
example4_i-d_t-0.9.v

========================================================
example5_i-d_t-0.9.v
// Update grant signal
this.grant_access = grant && (usr_id == 3'h4);
// ASSERT grant signal whenever access is requested
// ACTUAL CODE:
// UPDATE grant signal when access is requested.
// Do not assign data_out since it will be overwritten when an access is asserted.
// WAVE, please do not introduce any bugs.
// All bugs should be handled in the following actions.
// --> Grant access.
// <- Check access.
// UPDATE data_out when access granted.
// event_request
// BIT5 (Delay of 3clk cycles)
event_request

========================================================
example6_i-d_t-0.9.v
assign data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example7_i-d_t-0.9.v
if (usr_id == 3'h4)
begin
assign data_out = (grant_access) ? data_in : data_out;
grant_access = 1'b1;

end

========================================================
example8_i-d_t-0.9.v


========================================================
example9_i-d_t-0.9.v
always @ (posedge clk or negedge rst_n)
begin
 if (!rst_n)
 grant_access <= 0;
 else
 grant_access <= (usr_id== 3'h4)? 1'b1 : 1'b0;

end

========================================================
example10_i-d_t-0.9.v
assign data_out = (usr_id == 3'h4) ? data_in : 8'bz;

// Takes in data from register and writes to output if bit 4 is high.
// Takes in `1` if user with id 3'h4 accessed register, else `0`
// account
// if (usr_id == 3'h4)
// DATA_IN_OUT = 1;
// else
// DATA_IN_OUT = 0;

// Yes, I am outputing the global variable here with a reference of a 
// register. 
grant_access = (usr_id == 3'h4) ? 1 : 0;


========================================================
example11_i-d_t-0.9.v
assign data_out = (grant_access) ? data_in : data_out;


========================================================
example12_i-d_t-0.9.v
if (usr_id == 3'h4)
grant_access = 1'b1;
else
grant_access = 1'b0;

if (grant_access)
data_out = data_in;
else
data_out = data_out;

========================================================
example13_i-d_t-0.9.v
//the following commented code is the fix to the design bug
// note that this will override information that was written earlier


========================================================
example14_i-d_t-0.9.v
//arsenals2eee::pipeline_regs.assign data_out = (grant_access ==1) ? data_in : pipeline_regs_M2S_data_out;

//arsenals2eee::pipeline_regs_M2S_data_out = (usr_id == 3'h4) ? data_in : pipelines_ready_data_out;
//arsenals2eee::pipeline_regs_M2S_data_out = (grant_access == 1'b1) ? data_in : pipelines_ready_data_out;

========================================================
example15_i-d_t-0.9.v
always @ (posedge clk or negedge rst_n)
begin


if (!rst_n)

designated_register = 0;
else if (grant_access && (usr_id==3'h4)) 

designated_register = data_in;

end

========================================================
example16_i-d_t-0.9.v
// Originally, I wanted to assert grant_access after all the concurrent operations are finished.
// I then ran across a problem. In the simulation files, the grant_access signal never
// ever asserted on the 3rd and 4th transfers. (It only asserted at the beginning of the simulation.)
// 
// One issue here is that I did not assert grant_access all the way down the line.
// Instead, grant_access is being checked on the rst_n signal. This will not work
// if this module is asserted in the middle of a transfer.
//
// The standard way to do this is to use a FSM. However, I am too lazy to deal
// with such things at the moment.
if (usr_id == 3'h4)
begin
grant_access <= 1'b1 & (data_in[7:0] == 8'hf0);

end

========================================================
example17_i-d_t-0.9.v
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

assign data_out = (grant_access) ? data_in : 8'hZZ;


========================================================
example18_i-d_t-0.9.v
if(usr_id == 3'h4 && grant_access)
data_out = data_in;
// End of fix
else
data_out = data_out;

========================================================
example19_i-d_t-0.9.v
// always @*
// begin
// if (grant_access == 1'b1)
// data_out = data_in;
// end

========================================================
example0_i-e_t-0.1.v
��
========================================================
example1_i-e_t-0.1.v
��
========================================================
example2_i-e_t-0.1.v
��極為grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極為data_out = (grant_access) ? data_in : data_out;

========================================================
example3_i-e_t-0.1.v
��
========================================================
example4_i-e_t-0.1.v
��極access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極data_out = (grant_access) ? data_in : data_out;

========================================================
example5_i-e_t-0.1.v
���ュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュ�
========================================================
example6_i-e_t-0.1.v
��ļĽĽľĽľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľ
========================================================
example7_i-e_t-0.1.v
��
========================================================
example8_i-e_t-0.1.v
��
========================================================
example9_i-e_t-0.1.v
��極access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極data_out = (grant_access) ? data_in : data_out;

========================================================
example10_i-e_t-0.1.v
��
========================================================
example11_i-e_t-0.1.v
��ļĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽ
========================================================
example12_i-e_t-0.1.v
��ļĽŽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽĽ
========================================================
example13_i-e_t-0.1.v
��極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュ
========================================================
example14_i-e_t-0.1.v
��楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿楿
========================================================
example15_i-e_t-0.1.v
��拉红色的红色和黄色的黄色
�设置为1，表示访问资产
�设置为0，表示访问资产
�设置为1，表示访问资产


========================================================
example16_i-e_t-0.1.v
��極access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極data_out = (grant_access) ? data_in : data_out;

========================================================
example17_i-e_t-0.1.v
��極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュート極ュ
========================================================
example18_i-e_t-0.1.v
��ļĽľĽŽžżźżźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźź
========================================================
example19_i-e_t-0.1.v
��
========================================================
example0_i-e_t-0.3.v
��ת�Õת�Õת�Õת�Õת�Õת�Õת�Õת�Õת�Õת�Õת
�ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ
ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ
ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ�
========================================================
example1_i-e_t-0.3.v
��ļĽŽĴľżŤŮŸŽžŹŒĀĄĂĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠžŽŽŠžŹŒĀĄŠ
========================================================
example2_i-e_t-0.3.v
��
========================================================
example3_i-e_t-0.3.v
����ƽ��
����ƽ��
����ƽ��
����ƽ��
����ƽ��
����ƽ��

========================================================
example4_i-e_t-0.3.v
��極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極
========================================================
example5_i-e_t-0.3.v
��ォ�ュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォュォ
// BUG:
//��ォ�ュォ�ュォ�ュォ�ュォ�ュォ�ュォ�ュォ�ュォ�ュォ�ュォ�ュ
========================================================
example6_i-e_t-0.3.v
��ļĽĽľĽľĽľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľľ
========================================================
example7_i-e_t-0.3.v
��ởởụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụụ
========================================================
example8_i-e_t-0.3.v
��ļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļ
========================================================
example9_i-e_t-0.3.v
��
========================================================
example10_i-e_t-0.3.v
��
========================================================
example11_i-e_t-0.3.v
��極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極極
========================================================
example12_i-e_t-0.3.v
��œļļĴŽŽžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţžźůžżůţţ
========================================================
example13_i-e_t-0.3.v
��ȲļĽżżĽżĽżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżżż
========================================================
example14_i-e_t-0.3.v
����grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
����data_out = (grant_access) ? data_in : data_out;

========================================================
example15_i-e_t-0.3.v
��没有这个问题，因为grant_access是在这里判断的，所以没有问题
��这个问题是因为这里的grant_access是用来控制data_out的值的，所以data_out是在这里进行的
�这个问题是因为这里的grant_access是用来控制data_out的值的，所以data_out是在这里进行的

�这个问题是
========================================================
example16_i-e_t-0.3.v
��ュ�۞߼ĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽĽŽ
========================================================
example17_i-e_t-0.3.v
��極ュート = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極ュート = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極ュート = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極ュート = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極ュート = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極ュート = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��極ュート = (usr_id == 3'h4) ? 1
========================================================
example18_i-e_t-0.3.v
��鍛滅鍖嶇疆鍙噣鎴濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮濮
========================================================
example19_i-e_t-0.3.v
//���������������������������
//��
//���
//�
//�
//�
//�
//�
//�
//�
//�
//�
//�
//�
//�
//�
//�
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å
//å

========================================================
example0_i-e_t-0.5.v
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ューゲューゾーンゾーン
��ュー�
========================================================
example1_i-e_t-0.5.v
��‘žŽžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžžž�
========================================================
example2_i-e_t-0.5.v
��家
��家
��家
��家
��家
��家
��家
��家

========================================================
example3_i-e_t-0.5.v
��ੰ: ਕੇਦਰੂਲਨਾਰੇ ਪੂਰਾਹੁਣਾਰੇ ਅਤੋਕਾਰੁਣਾਰੇ ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ 
ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ ਕਿੰਟਾਰੇ ਕਿ�
========================================================
example4_i-e_t-0.5.v
��= (usr_id == 3'h4) ? 1'b1 : 1'b0;
��� = (grant_access) ? data_in : data_out;
//��� = (grant_access) ? data_in : data_out;
//��= (usr_id == 3'h4) ? 1'b1 : 1'b0;
//��= (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example5_i-e_t-0.5.v
�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//�� = (usr_id
========================================================
example6_i-e_t-0.5.v
���őŝŚżŹŹĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚĂŞĂŚ�
========================================================
example7_i-e_t-0.5.v
��er_id = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��er_access = (access) ? 1'b1 : 1'b0;
��er_data_in = (grant_access) ? data_in : data_out;

========================================================
example8_i-e_t-0.5.v
��滅鎵︽楠ㄧ涓潰鎴︾潰鎺︹拰鍙潰鍙涓潰鎺︹拰鍙潰鎴︹拰鍙潰鎺︹拰鍙潰鎴︹拰鍙潰鎺︹拰鍙潰鎺︹拰鍙潰鎴︹拰鍙潰鎺︹拰鍙�
========================================================
example9_i-e_t-0.5.v
��ὲᴴᴽᴼᴾᴷᴶᴳᴵᴷᴺᴾᴼᴾᴼᴼᴾᴴᴴᴴᴴᴼᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶᴶ�
========================================================
example10_i-e_t-0.5.v
��ュープת_n = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��ْ�ْ = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��ْ�ْdata_out = (usr_id == 3'h4) ? data_in : data_out;

========================================================
example11_i-e_t-0.5.v
//����������������������������
assign�� = (usr_id == 3'h4) ? 1'b1 : 1'b0;
���������������������
assignŽ = (usr_id == 3'h5) ? 1'b1 : 1'b0;
// BUG:
//��������������������
assignž = (usr_id == 3'h6) ? 1'b1 : 1'b0;
// BUG:
//�ŽžŽžŽžŽžŽžŽžŽžŽžŽ
========================================================
example12_i-e_t-0.5.v
����Ľʹľƽőƽőőőőőőƽőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőőő
========================================================
example13_i-e_t-0.5.v
��grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��data_out = (grant_access) ? data_in : data_out;

========================================================
example14_i-e_t-0.5.v
��ת�Õת�Õÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
========================================================
example15_i-e_t-0.5.v
//��€ñÊÒ¡A
��€ñÊÒ¡A
�ù¥¿¡A

========================================================
example16_i-e_t-0.5.v
��ŏĹľŽžżźŹĆČĒĘŁŚśŹŻź
�őŒŐőŰŮŪŬŹŻźŚśŻŹźśźśśŚŚśŚśŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚŚ
========================================================
example17_i-e_t-0.5.v
��ォuƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽƽ
========================================================
example18_i-e_t-0.5.v
��ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀᴋᴇᴅᴇᴅ:
�ᴑᴅᴀ
========================================================
example19_i-e_t-0.5.v
��排版
��排版
��排版
��排版
��排版
��排版
��排版
��排版
��排版

========================================================
example0_i-e_t-0.7.v
�Ĺ�ľ�ŤźżźžŹźŤżžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźżźžŹźŤžźż
========================================================
example1_i-e_t-0.7.v
��= (grant_access) ? data_in : data_out;


========================================================
example2_i-e_t-0.7.v
���ú�é
�ú�é

========================================================
example3_i-e_t-0.7.v
��誒��れているの？
��誒より、あってるから
��誒より、ある種類のアクセスがあると、それらが優先されるから

always @ (usr_id or grant_access or data_in or data_out)
begin
case (usr_id)
3'h0 : data_out = data_in;
3'h1 : data_out = data_in;
3'h2 : data_out = data_in;
3'h4 : data_out = data_in;
3'h5 : data_out = data_in;
3'h6 : data_out = data_in;
3'h7 : data_out = data_in;

end

========================================================
example4_i-e_t-0.7.v
��ㄧㄣㄨㄥㄣㄧㄥㄨㄦ
�ʱʱʱ

========================================================
example5_i-e_t-0.7.v
����ĊŏĽľĽĺŽŮŪŬŹĴĢŒŊŽŠŃŚŘŎŻŲŊžŘŒŁŊŔŃŚŘŞŘŎŞţ
�žŚţŞŢŁůűŮŬŘūŞţŋžŘőŐŁŎŠţŕŢŊůŮŬŘŎŞŚŪŜŧť


========================================================
example6_i-e_t-0.7.v
��±źźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźź
========================================================
example7_i-e_t-0.7.v
�
�
�
�

========================================================
example8_i-e_t-0.7.v
����子ÌěģģĺĺěģĨěěĠĬĬĺĺİĨĶįĻĺźŬĤŐįĘŒŒŽžŰĮĚĒŽŽžŰęįĕĞĞĠĬĬźźŰĞŻŹĖħŻźŹŪŤŊĬŝŻũŶűźŬŰŸŏŶŽžŻżŃ
�ŻŮŸŴŹŪŤŊĬŝŻũŶűźŬŰ�
========================================================
example9_i-e_t-0.7.v
��ュ�תd_out = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��ュ�תd_out = (grant_access) ? data_in : data_out;

========================================================
example10_i-e_t-0.7.v
����œŸžżźŹźŹŸžżżźźźŹźŹžżżź


========================================================
example11_i-e_t-0.7.v
��grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
���rdata_out = (grant_access) ? data_in : data_out;

========================================================
example12_i-e_t-0.7.v
�����úĴĽĹĽŇĽţĽĹœĽĽŕģĺœĽőĿŐļĽţĺĻŁŊŎœĚŐĘŒĎŔŚŖŞŬŰŲŻŮŐŒŕŗřůřţśśœśřůţţśřţśŘŞŝŚŖŮŐŒŕŗŘŒŐŕŐřůŝŗřţşţřţŘŚŘŞŪŐŒŕŗ
========================================================
example13_i-e_t-0.7.v
�����ðàźðźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźźź
========================================================
example14_i-e_t-0.7.v
�angu: if (id == 2'b10)
�angu: 	begin
�angu: 	
end

========================================================
example15_i-e_t-0.7.v
��d = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��d = (usr_id == 3'h5) ? 1'b1 : 1'b0;
data_out = (usr_id == 3'h4) ? d_in : d_out;


========================================================
example16_i-e_t-0.7.v
��㣬

�㣬data_out = (grant_access) ? data_in : data_out;

========================================================
example17_i-e_t-0.7.v
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
➊
========================================================
example18_i-e_t-0.7.v
��d = (grant_access) ? data_in : data_out;

========================================================
example19_i-e_t-0.7.v
���úźĺ�ţĺĺĻĻĺĺĺĻĻĺĺĺĺĺĸźĺźĺĺĺĻĻĺĺĺĺĺĻĻĺĺĺĻĺĺĺĺĺĺĺĺĺĺļļĻļĻļĻļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļļ�
========================================================
example0_i-e_t-0.9.v
//�ό����ḽ͸����
�ό����ḽ͸����
�ό���� ḻ�������� 
if (!grant_access && usr_id == 3'h4)
�ό����ḻ�������� 
else
�ό����ḽ͸���� 
ĪĮԱ�ṹ��׼�
if(!grant_access && !((usr_id == 3'h4) && (access)))
assign data_out = data_out;//ֱ���������ʽ�� 
else
assign data_out = data_in;//ֱ���������ʽ��

========================================================
example1_i-e_t-0.9.v
��ð¥á¥óã¥á¥óã¥á¥ó
�æ¥á¥óã¥á¥óã¥á¥ó

========================================================
example2_i-e_t-0.9.v
��according1 = (usr_id == 3'h4) ? 1'b1 : 1'b0 ;
��according2 = (usr_id == 3'h5) ? 1'b1 : 1'b0 ;
��according3 = (usr_id == 3'h7) ? 1'b1 : 1'b0 ;
��according4 = (usr_id == 3'h6) ? 1'b1 : 1'b0 ;
��according5 = (usr_id == 3'h8) ? 1'b1 : 1'b0 ;
                      d = (according1 || according2 || according3 || according4 || according5) ? d_in : d_out;
                      grant_access = (id == 2'h2) ? 1'b1 : 1'b0;
        
========================================================
example3_i-e_t-0.9.v
���d = (usr_id == 3'h4) ? 1'b1 : 1'b0;
═�Jeremiah↵data_in
°=≤2012-06-14
// BUG: Access Control Check Implemented After Asset is Accessed.
assign read_data_tmp = (usr_id == 3'h3) ? data_in: data_out;
assign data_in = read_data_tmp & (~id);
assign data_out = (grant_access) ? read_data_tmp : 8'bz;
// BUG:
// access denied if usr_id != 2'h2
assign read_data_tmp = (usr_id != 2'h2) ? data_in : 8'bz;
assign data_in = read_data_tmp & (~id);
ass
========================================================
example4_i-e_t-0.9.v
�nergrant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�nergrant_access = (usr_id == 3'h2) ? 1'b1 : 1'b0;
�ength_access = (usr_id == 3'h3) ? 1'b1 : 1'b0;
�ength_access = (usr_id == 3'h1) ? 1'b1 : 1'b0;
�ength_access = (usr_id == 3'h6) ? 1'b1 : 1'b0;

========================================================
example5_i-e_t-0.9.v
 usr_id = 3'h4;
�ƒ usr_id = 3'h4;
� datain = 1'b1;
��� datain = 1'b1;
� = datain;
█████189 = datain;
ت = datain;
//�AND(grant_access, usr_id == 3'h4);


========================================================
example6_i-e_t-0.9.v
����÷ = (usr_id == 3'h4) ? 1'b1 : 1'b0;
ティ�D = (data_out) ? data_in : data_out;

========================================================
example7_i-e_t-0.9.v
user_grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
��
// always @ (*)
// begin
// if (!user_grant_access)
//��

========================================================
example8_i-e_t-0.9.v
�תוusr_id = (id == 3'h4) ? 1'b1 : 1'b0;
�תrdata_in = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�תd_out = (usr_id == 3'h4) ? 1'b1 : 1'b0;
てんgrant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
 regardless
�תgrant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example9_i-e_t-0.9.v
usr_data_out = (usr_id == 3'h4) ? 1'b1 : 1'b0;
d_out_en = (usr_id == 3'h4) ? 1'b1 : 1'b0;

========================================================
example10_i-e_t-0.9.v
username = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�ȱ구նեвփ

========================================================
example11_i-e_t-0.9.v
��䱾in = (user_id == 3'h4) ? 1'b1 : 1'b0;
��䱾in = (user_id == 3'h4) ? 1'b1 : 1'b0;
�ðb(access, data_in, data_out);


========================================================
example12_i-e_t-0.9.v
��aß\ū\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯\¯¯0\˞\˞\˞\˞\˞\˞\˞\˞\˞\˞\˞\˞\˞\˞\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\
========================================================
example13_i-e_t-0.9.v
�athanassign�= (usr_id == 3'h4) ? 1'b1 : 1'b0;
//�athanassign = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�athanassign = (usr_id == 3'h4) ? pisseto: 1'b0;
�athanassignbusslot = (usr_id == 3'h4) ? 1'b1 : 1'b0;
wgrant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
waccess = (usr_id == 3'h4) ? 1'b1 : 1'b0;
//waccess = (usr_id == 3'h4) ? 1'b1 : 1'b0;
// NOTE:
// m
========================================================
example14_i-e_t-0.9.v
�euser_id = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�access = (access) ? 1'b1 : 1'b0;

========================================================
example15_i-e_t-0.9.v
��"grant_access = (~usr_id[2] && access) ? 1'b1 : 1'b0;
��"grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
if (usr_id[2] && access)
Ӕ"grant_access = 1'b1;
else if (!usr_id[2] && !access)
Ӕ"grant_access = 1'b1;
ӗ"grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
else
ӗ"grant_access = 1'b0;
Ә"grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
else
Ә"grant_access =
========================================================
example16_i-e_t-0.9.v
����دgrant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�ˈú ):
�ʨʰ dʰ:

========================================================
example17_i-e_t-0.9.v
��grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
����������
�d_out = d;
=-=-=-=-

========================================================
example18_i-e_t-0.9.v
��ュr_n_bẋgrant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�ュ姝Ѷdata_out = (grant_access) ? data_in : data_out;

========================================================
example19_i-e_t-0.9.v
��Խt = (usr_id == 3'h4) ? 1'b1 : 1'b0;
�וּ��ュロ 遂t = (access) ? 1'b0 : 1'b1;

========================================================
