MATLAB 帮助中心
创建 HDL Coder 代码生成配置对象
config_obj = coder.config('hdl')
config_obj = coder.config('fixpt')
config_obj = coder.config('hdl') 创建一个 coder.HdlConfig 配置对象,用于在从 MATLAB® 代码生成 HDL 或高级综合 (HLS) 代码时与 HDL codegen 函数结合使用。
coder.HdlConfig
codegen
示例
config_obj = coder.config('fixpt') 创建一个 coder.FixptConfig 配置对象,用于在从浮点 MATLAB 代码生成 HDL 代码时与 HDL codegen 函数结合使用。coder.FixptConfig 对象配置浮点到定点转换。
coder.FixptConfig
全部折叠
使用默认设置创建一个 coder.FixptConfig 对象 fixptcfg。
fixptcfg
fixptcfg = coder.config('fixpt');
设置测试平台名称。在此示例中,测试平台函数名称为 mlhdlc_dti_tb。
mlhdlc_dti_tb
fixptcfg.TestBenchName = 'mlhdlc_dti_tb';
使用默认设置创建一个 coder.HdlConfig 对象 hdlcfg。
hdlcfg
hdlcfg = coder.config('hdl');
将您的浮点 MATLAB 设计转换为定点,并生成 HDL 或 HLS 代码。在此示例中,MATLAB 设计函数名称为 mlhdlc_dti。
mlhdlc_dti
codegen -float2fixed fixptcfg -config hdlcfg mlhdlc_dti
在 R2013a 中推出
coder.HdlConfig | coder.FixPtConfig | codegen
coder.FixPtConfig
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处