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

📄 dist_calc.v

📁 (2
💻 V
字号:
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer:
//
// Create Date:    09:52:58 07/30/09
// Design Name:    
// Module Name:    dist_calc
// Project Name:   
// Target Device:  
// Tool versions:  
// Description:
//
// Dependencies:
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
////////////////////////////////////////////////////////////////////////////////
module dist_calc(InputSymbol, BranchOutput, OutputDistance);
input [1:0] InputSymbol, BranchOutput; 
output [1:0] OutputDistance;
reg [1:0] OutputDistance;

wire MS, LS;

   assign MS = (InputSymbol[1] ^ BranchOutput[1]);
   assign LS = (InputSymbol[0] ^ BranchOutput[0]);

   always @(MS or LS)
   begin
      OutputDistance[1] <= MS & LS;    
      OutputDistance[0] <= MS ^ LS;    
   end

endmodule

⌨️ 快捷键说明

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