差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
3_to_8_decoder [2021/10/09 10:44]
gongyu [3. 原理图]
3_to_8_decoder [2021/10/09 11:05] (当前版本)
gongyu
行 16: 行 16:
 八路信号输出:Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7 八路信号输出:Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7
  
-### 2. CircuitJS电路仿真 +### 2. 原理图
- +
-### 3. 原理图+
  
 {{drawio>​decode38_stepfpga_block.png}} {{drawio>​decode38_stepfpga_block.png}}
行 33: 行 31:
 正如我们在原理及硬件连接中描述的,我们需要一路芯片使能端口、三路信号输入端口和八路信号输出端口。模块端口设计如下: 正如我们在原理及硬件连接中描述的,我们需要一路芯片使能端口、三路信号输入端口和八路信号输出端口。模块端口设计如下:
  
-### 4. Verilog代码+### 3. Verilog代码
 <code verilog> <code verilog>
 +// ********************************************************************
 +// >>>>>>>>>>>>>>>>>>>>>>>>>​ COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<​
 +// ********************************************************************
 +// File name    : decode38.v
 +// Module name  : decode38
 +// Author ​      : STEP
 +// Description ​ : 3-8decode control LED
 +// Web          : www.stepfpga.com
 +// 
 +// --------------------------------------------------------------------
 +// Code Revision History : 
 +// --------------------------------------------------------------------
 +// Version: |Mod. Date:   ​|Changes Made:
 +// V1.0     ​|2021/​10/​08 ​  ​|Initial ver
 +// --------------------------------------------------------------------
 +// Module Function:​利用3路开关的状态作为输入,通过3-8译码实现控制LED灯的显示。
 + 
 module Decode38 ​ module Decode38 ​
 ( (
-input Enable, +input Enable, ​                                  //Enable to make the logice work 
-input [2:0] A_in, +input [2:0] A_in,                               //3 input signals 
-output reg [7:0] Y_out+output reg [7:0] Y_out                          //8 decoded signals out
 ); );
-</​code>​ 
  
-逻辑部分,当芯片使能信号无效时,输出全部置高,当芯片使能信号有效时,根据三路信号的输入状态译码控制八路信号输出。 
- 
-<code verilog> 
 always@(A_in or Enable) begin always@(A_in or Enable) begin
     if (Enable)     if (Enable)
行 61: 行 72:
     else Y_out = 8'​b11111111;​     else Y_out = 8'​b11111111;​
 end end
 +
 +endmodule
 </​code>​ </​code>​
  
-### 5. 管脚分配+{{ :​decode38_verilog.png |}} <WRAP centeralign>​ WebIDE里的代码界面 </​WRAP>​ 
 + 
 + 
 +### 4. 管脚分配 
 +{{ :​decode38_pinout.png |}} <WRAP centeralign>​ Web IDE里的管脚分配 ​</​WRAP>​ 
  
-### 6. 板上验证+### 5. 板上验证