Reset in FilterHDL RTL code

조회 수: 2 (최근 30일)
Davide Capotosto
Davide Capotosto 2018년 1월 26일
댓글: Davide Capotosto 2018년 2월 2일
Hello, I would like, when generating RTL code from Filter HDL coder toolbox, to create code with both asynchronous and synchronous resets. Is it possible ? How ? Many thanks in advance

답변 (1개)

Gaurav Phatnani
Gaurav Phatnani 2018년 2월 2일
Hi Davide,
Unfortunately there is no way to generate code for both Asynchronous and Synchronous Reset Types by calling code generation once. In order to do this you will have to run code generation two times.
You can write a MATLAB script to automate this process. This link has some documentation on the Command Line Interface for HDL code generation.
To change the 'ResetType' from a MATLAB script you can use the following function:
>> hdlset_param(gcs,'ResetType','sync') %change the Reset Type to Synchronous
>> hdlset_param(gcs,'ResetType','async') %change the Reset Type to Asynchronous
  댓글 수: 1
Davide Capotosto
Davide Capotosto 2018년 2월 2일
Good afternoon, but if I launch code generation 2 times I will get 2 different codes, one with asynchronous and one with synchronous reset, am I right ? what I was expecting was a method to obtain one piece of code with the 2 reset istantianted. Something like always @(posedge clock or posedge reset_async) begin if (reset_async==1) pdm_data_resampled <=0; else begin if (reset_sync==1) pdm_data_resampled<=0; else begin ..... end
with 2 different codes, the "merge" can be very tedious . Best Regards

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by