⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subdesign.vhd

📁 出租车计价器
💻 VHD
字号:
 Subdesign 23to0
     (inclk    :input;
     ot[13..0] :output;
    )
    Variable
     hw[1..0],lw[3..0]:dff; 
    Begin
      (hw[],lw[]).clk=inclk;
      if (hw[]==2)and(lw[]==3)  then
         hw[]=0;lw[]=0;
      elsif lw[]==9 then
         hw[]=hw[]+1;lw[]=0;
      else
         hw[]=hw[];lw[]=lw[]+1;
      end if;
      Table
        hw[]=>ot13,ot12,ot11,ot10,ot9,ot8,ot7;
             0 => 1,1,1,1,1,1,0;
             1 => 0,1,1,0,0,0,0;
             2 => 1,1,0,1,1,0,1;
      End table;
      Table
        lw[]=>ot6,ot5,ot4,ot3,ot2,ot1,ot0;
            0 => 1,1,1,1,1,1,0;
            1 => 0,1,1,0,0,0,0;
            2 => 1,1,0,1,1,0,1;
            3 => 1,1,1,1,0,0,1;
            4 => 0,1,1,0,0,1,1;
            5 => 1,0,1,1,0,1,1;
            6 => 1,0,1,1,1,1,1;
            7 => 1,1,1,0,0,0,0;
            8 => 1,1,1,1,1,1,1;
            9 => 1,1,1,1,0,1,1;
      End table;
  End;

⌨️ 快捷键说明

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