Questions tagged [hdl-coder]

HDL Coder is a MATLAB module that converts MATLAB code into HDL (VHDL or Verilog) code.

HDL Coder is a MATLAB module that converts MATLAB code into HDL (VHDL or Verilog) code.

19 questions
3
votes
1 answer

Why is a sum statement so bizarrely synthesized?

I have 4 buttons on an FPGA dev board so I wrote function [HEX0] = Bar(KEY) n = uint8(sum(KEY, 'native')); ... Unfortunately, HDL Coder turned it into the following chunk of VHDL: y := '0'; FOR k IN 0 TO 3 LOOP y := y OR KEY(k); END…
Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
1
vote
0 answers

Commands invalid after 'import_board_preset' command

Currently I am trying to follow the MathWorks tutorial 1 to register a TE0720 with a TE0701-6 carrier board in Matlab. I followed the instructions, designed the block design and exported it as advised. Using the Matlab HDL Workflow Advisor I can…
fukurai
  • 104
  • 1
  • 1
  • 9
1
vote
0 answers

Long inputs in Matlab HDL coder

I am trying to program a module in Matlab that will be translated to Verilog. My module has a lot of inputs, so I want to group them into a unique string of bits so the module will have only one input. The problem is that this input will be very…
1
vote
0 answers

Failed Cannot connect to 'Mentor Graphics ModelSim' HDL simulator

I am trying to perform cosimulation in HDL Coder using ModelSim 10.2c .But getting below error : Failed Cannot connect to 'Mentor Graphics ModelSim' HDL simulator Does any one know what could be reason of this error please? Thanks a lot
Haider
  • 13
  • 4
1
vote
0 answers

Error using Matlab HDL Coder

I am trying to covert a matlab code into VHDL using HDL Coder. When I try to simulate my model it gives me the error : Illegal Fixed-Point Data Type: the numbers of bits exceeded the supported maximum I have used fixed data type in my blocks. Does…
Qamar
  • 23
  • 4
0
votes
1 answer

How do I implement matlab code on hardware device to make it run?

My question is quite basic to most appropriate levels on consideration. I lack the perception of how can I dump or implement my matlab code on a hardware component like processors or fpga? For eg: Suppose I create an image processing matlab (object…
0
votes
1 answer

CRC-16 and/or Frame Check Sequence

I have an incoming packet that reads 7E0302403F387E from a serial port. start and end flag is 7E, FCS/CRC is 3F38 and the data is 030240. The FCS is calculated per the algorithm specified in RFC 1662.…
MuGa
  • 27
  • 5
0
votes
1 answer

MATLAB script use in System verilog using SNPS VCS tool

I have coded an algorithm using MATLAB R2019 script and i want it to be called in an System verilog file i.e The output generated by the matlab script is actually to be fed into the testbench written using SV. I dont want to use HDL coder tool as…
0
votes
1 answer

how to optimize (reduce) the latency in the verilog HDL code (hardware) generated by the MATLAB HDL CODER add-on from a given Simulink model?

Thanks in advance, I am having a simple Simulink model, that takes in a 32-bit number in the IEEE-754 format and adds the same number, which gives the output again in the 32-bit wide IEEE-754 format. I used MATLAB's HDL CODER add-on and generated…
saikumar
  • 179
  • 1
  • 3
  • 12
0
votes
1 answer

MATLAB coder error while converting code to hdl for xcorr function

I want to use HDL coder to convert MATLAB xcorr function to VHDL language. My code is given in below, i think i made a mistake when I'm defining the input data types. What should be the input data type to define a vector to use this code? Or am I…
0
votes
1 answer

I am using MATLAB HDL coder to convert matlab coder and currently having some error

I am not able to get this error removed. Can someone please help me. The problem is it is showing some error in step 4 while generation of hdl code. function [Rxx]=autom(X) % [Rxx]=autom(x) Rxx=zeros(1,1024); for m=1: 1025 for n=1:…
0
votes
1 answer

HDLC frame HCS and FCS

I have an HDLC frame like blow and I want to calculate the HCS and FCS algorithm. Its based on DLMS protocol noted in green book page 128. Here is an example of this frame: Ex.1: Frame=`(7EA016030002002352A25EE6E700C401C10012000211927E)Hex` HCS = `(…
Pitter
  • 1
  • 1
0
votes
1 answer

Work with binary numbers as scalars in Matlab

I am working with a MATLAB function that uses numbers in the binary base. To do so it uses the function dec2bin to transform an integer into a char array containing the binary information. The issue is that I plan to use HDL Coder to generate a HDL…
videbar
  • 21
  • 2
0
votes
0 answers

Matlab hdl coding

I received this error message when I try the conversion via HDL coder. Can someone help me? Thank you! function [p_max,t_max]=ricmax(g,fs) valmin=0.40*max(g); [p_max,t_max]=findpeaks(g,'minpeakheight',valmin); …
petril
  • 1
  • 1
0
votes
1 answer

Convert matlab-code into vhdl with HDL Workflow Advisor

I've made a Matlab program where it detects if 2 circles intersect each other and outputs the coordinates of the intersections. Now, I'm trying to convert the code into vhdl for FPGA implementation. One of the functions within my code where there is…
user3488736
  • 109
  • 1
  • 3
  • 13
1
2