Error when generating test bench

2 ビュー (過去 30 日間)
Aswin PJ
Aswin PJ 2016 年 3 月 20 日
回答済み: Kiran Kintali 2021 年 4 月 6 日
I am generating a test bench for an AES encrypt/decrypt function that I wrote. It has the prototype of
function EnPlainText = aes_init(cipherPlain,key,mode)
%EnPlainText - Encrypted/Plain Text
%CipherPlain - Cipher/plain text
%key - key
%mode - true for encryption and false for decrypt
I created a testbench by the name 'main.m' with the following contents:
cipherText = aes_init(16:-1:1,1:16,true)
plainText = aes_init(cipherText,1:16,false)
I then converted the code into HDL code using the HDL converter. All the steps until the HDL verification was successful without any warnings or errors. When I try to test the generated code with test bench using Verify with HDL Test Bench option in the HDL coder menu, the following error is shown.
### Begin TestBench generation.
Error using eml_error (line 20)
BIT must be integers between 1 and 4 for embedded.fi.
Error in Float2FixedConverter>runTestBenchToLogDataNew/withScopeProtection/runSimWithTBEvalSimFcn at 567
Error in Float2FixedConverter>runTestBenchToLogDataNew at 495
Error in HDLCoderTB>computeData at 399
Error in HDLCoderTB>generateTB at 460
Error in Manager>wfa_runSimulation at 760
Why is this error being shown. How can I fix this?
Thanks.
  1 件のコメント
Sai Sankar
Sai Sankar 2017 年 5 月 5 日
bro i too get same error, did u figure it out. can u tell me what to do to fix that error

サインインしてコメントする。

回答 (1 件)

Kiran Kintali
Kiran Kintali 2021 年 4 月 6 日
Need dut.m and testbench.m and a project file (with data type settings, HDL settings) to debug such floating point to fixed poitn conversion or HDL code generation issues.

カテゴリ

Help Center および File ExchangeHDL Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by