# DesignWare IP ###### tags: `Digital IC Design` [回到主頁面](https://hackmd.io/@derek8955/BkK2Nb5Jo/https%3A%2F%2Fhackmd.io%2FdpcBlBL8TlShpQ-wSi9Quw)  ### <font color = "blue">What is DesignWare IP </font> 裡面含有豐富的運算單元( 在 /usr/cad/synopsys/synthesis/2019.12/dw/doc/manuals/dwbb_userguide.pdf 內有說明文件 )  在 /usr/cad/synopsys/synthesis/2019.12/dw/doc/datasheet/ 內有對每個模塊更詳細的介紹  ### <font color = "blue"> Invoke DesignWare Method </font> two method : - Inference : 直接在 desing 裡打加號 or 減號 ...等 ( Logic synthesis 就是利用 designWare IP 將 +/- 之類的運算符號轉換成 netlist ) ```verilog= module adder( a, b, result ); input a,b; output [1:0] result; assign result = a + b; endmodule ```  - Instantiation IP : 與一般的方法相似,直接寫在 module 內,但記得在 simulation 的時候要把路徑 include 進來,include 的方法有以下兩種 : - Absolute path : - Relative path : 要去實際路徑下把檔案 copy 到 simulation 的 work location ```verilog= // Absolute `include “/usr/cad/synopsys/synthesis/2019.12/dw/sim_ver/<model_name>.v ” module example(); ..... ..... ..... endmodule ---------------------------------------------------------------------------------- // Relative `include “<model_name>.v ” module example(); ..... ..... ..... endmodule ``` > 因為 DesignWare IP 可以任意調整 bus width(詳細內容在檔案的 parameter description 可以查找 ),所以在 instantiation 有些許的差別  ```verilog= // syntax : reference_cell parameter_description cell_name(); module example( inst_A, inst_SIN_COS, WAVE_inst ); parameter inst_A_width = 24; parameter inst_WAVE_width = 25; parameter inst_arch = 0; parameter inst_err_range = 1; input [inst_A_width-1 : 0] inst_A; input inst_SIN_COS; output [inst_WAVE_width-1 : 0] WAVE_inst; DW_sincos #( inst_A_width, inst_WAVE_width, inst_arch, inst_err_range ) U1( .A(inst_A), .SIN_COS(inst_SIN_COS), .WAVE(WAVE_inst) ); endmodule ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up