Seeking Guidance on Auto-Generating Verilog Code for ASIC Simulation with HDL Coder and Deep Learning HDL Toolbox

조회 수: 5 (최근 30일)
I am currently working on an ASIC design project and have both HDL Coder and the Deep Learning HDL Toolbox installed. I need to generate Verilog code that can be simulated in Synopsys VCS or Siemens Questa, rather than creating a bitstream for FPGAs using tools like Vivado or Quartus.
The documentation for the Deep Learning HDL Toolbox states that it "enables you to customize the hardware implementation of your deep learning network and generate portable, synthesizable Verilog and VHDL code for deployment on any FPGA or SoC (with HDL Coder and Simulink)." However, I have only found documentation related to FPGA development and haven’t come across resources specifically focused on generating Verilog code for ASIC design.
Has anyone successfully used these tools for ASIC-focused Verilog generation and simulation? If so, could you point me to any documentation or examples that cover this workflow? Alternatively, if this isn’t supported, is there a workaround or another tool that might help bridge the gap?
For example, for a MATLAB built-in pretrained image classification network like SqueezeNet:
[net, classNames] = imagePretrainedNetwork("squeezenet");
What are the next steps to generate an int8 quantification Verilog top module with a matrix (227 x 227 x 3) input [7:0], and 1000 output [7:0]?
Any guidance would be greatly appreciated!

답변 (2개)

Bharathi Yogaraj
Bharathi Yogaraj 2024년 10월 14일
After creating hPC, use the following commands to generate verilog code for ASIC workflow that is independent of any specific vendor:
hPC = dlhdl.ProcessorConfig;
hPC.TargetPlatform = 'Generic Deep Learning Processor';
hPC.SynthesisTool = '';
hPC.UseVendorLibrary = 'off';
Next, execute dlhdl.buildProcessor using the commands mentioned in the previous response.
For int8 quantization workflow, refer Classify Images on FPGA Using Quantized Neural Network - MATLAB & Simulink - MathWorks India example and replace the network and dataset in the example with SqueezeNet and its corresponding dataset.

Kiran Kintali
Kiran Kintali 2024년 10월 13일
Classify ECG Signals Using DAG Network Deployed to FPGA
This example shows how to classify human electrocardiogram (ECG) signals by deploying a transfer learning trained SqueezeNet network trainedSN to a Xilinx® Zynq® Ultrascale+™ ZCU102 board.
To generate custom Verilog code you can use these commands
hPC = dlhdl.ProcessorConfig;
dlhdl.buildProcessor(hPC,'ProjectFolder','fconlyprocessor_prj',...
'ProcessorName','fconlyprocessor','HDLCoderConfig',{'TargetLanguage','Verilog'}); % <=====

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by