in_out.tdf

来自「简单的CPU设计数字系统实验」· TDF 代码 · 共 13 行

TDF
13
字号
SUBDESIGN in_out
(dr1,dr0,enable:input;
 in,out :output;
 halt:output;)
begin
  if ((enable==1)and(dr1==1) and (dr0==0)) then (in,out,halt)=(B"0",B"1",B"0");
  end if;
  if ((enable==1)and(dr1==0) and (dr0==1)) then (in,out,halt)=(B"1",B"0",B"0");
  end if;
  if ((enable==1)and(dr1==dr0)) then (in,out,halt)=(B"0",B"0",B"1");
  end if;
end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?