基础004_V7-DSP Slice

主要参考ug479.pdf。之前的文章:FIR调用DSP48E_05。本文主要记录基本用法。

一、DSP48核

  A-参数说明

  •  instrctions,多个功能,通过sel选用

目前没发现C勾选与否,有何影响。

如上图所示,结果3拍后输出:

其他参数:

  B-IP调用

 生成IP核,参数设置完毕直接调用即可

dsp48_ex dsp_inst(
.CLK(clk),
.A(a),
.B(b),
.C(c),
.P(p)
);

  

二、原语示例

主要参考pg148-dsp48 macro.pdf用到再细化补充。

  Ex1

// m = b * (a + d)
// p = c+m or p+m

`timescale 1ns / 1ps
 
// m = b * (a + d)
// p = c+m or p+m
module dsp48_wrap_f
  (
   input          clock,
   input          ce1,
   input          ce2,
   input          cem,
   input          cep,
   input signed [24:0]    a,
   input signed [17:0]    b,
   input signed [47:0]    c,
   input signed [24:0]    d, // this has two fewer pipe stages
   // X+Y is usually the multiplier output (M)
   // Z is either P, PCIN or C
   // bit 1:0: 0: Z+X+Y 3:Z-(X+Y) 1: -Z + (X+Y) 2: -1*(Z+X+Y+1)
   // bits 3:2, 0: Z=0, 1: Z=PCIN, 2: Z=P, 3: Z = C
   // bit 4: sub in pre add
   input [4:0]        mode,
   input signed [47:0]    pcin,
   output signed [47:0]   pcout,
   output signed [47-S:0] p);
 
   parameter S = 0;
 
   parameter US
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
11-23 806
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值