mult8x8_s.v

来自「本人正在学习vhdl语言」· Verilog 代码 · 共 45 行

V
45 行
字号
//
// Module: MULT8X8_S
//
// Description: Verilog Sub-module
// 8-bit X 8-bit embedded signed multiplier (asynchronous)
//
// Device: Virtex-II Family
//
// Copyright (c) 2000 Xilinx, Inc.  All rights reserved.
//
////////////////////////////////////////////////////////////////////////////////////
//
/**************************************
   Theory for 8x8 bit multiplier
    using lsb inputs, outputs

    [2'b0][a{7,7,7,7,7,7,7,7}][a{7:0}]
  x [2'b0][b{7,7,7,7,7,7,7,7}][b{7:0}]
  ------------------------------------
*************************************/
module MULT8X8_S (A,B,P);

input [7:0] A;
input [7:0] B;

output [15:0] P;
wire [35:0] Product;

//
// Instantiation Section
//

MULT18X18 U_MULT8X8_S
  (
    .A ({2'b0, A[7], A[7], A[7], A[7], A[7], A[7], A[7], A[7], A}) , 
    .B ({2'b0, B[7], B[7], B[7], B[7], B[7], B[7], B[7], B[7], B}) , 
    .P (Product)   
  );
assign P = Product[15:0];

//
////////////////////////////////////////////////////////////////////////////////////

endmodule

⌨️ 快捷键说明

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