HDL Workflow advisor to convert a difference equation into verilog
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a Simulink model of a DC-DC convertor (attached below). The PID block is to control the duty cycle which is modeled using Delays, Gains and Adder. Now i want to model the PID block in verilog. I need help doing it in below two ways.
1. Convert the PID block directly using the HDL Workflow advisor with fixed-point conversion of Gains and other signals 2. convert the PID block into a Matlab function block in simulink. convert the function to verilog using HDL Workflow advisor with fixed point conversion of Gains and other signals
댓글 수: 0
답변 (1개)
Tim McBrayer
2016년 10월 21일
I'm not entirely sure what your question is. Both approaches are perfectly valid as input for HDL Coder and are both very well supported. Both will need conversion to fixed point data. Once you choose the appropriate data types for your arithmetic operators, to balance word size vs. precision, HDL Coder can generate your platform-independent Verilog code.
As a new feature in R2016b, HDL Coder now has Native Floating Point support. This feature generates HDL compliant with the IEEE-754 floating point standard for the single (32-bit) data type. Should you want to explore this route, the only model modification necessary would be to convert your model to use the single datatype instead of double. You will need to understand the effects that this has on your generated code as well.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!