f



MATLAB Coding to Verilog HDL Coding

Dear All,

Hi, i am doing a project in which i have to convert MATLAB coding into Verilog HDL Coding or only HDL coding. I am familiar with the FPGA n also with the MATLAB but didn't have any idea about how to convert the coding. After searching for the respective topic i came to know that there is a simulink HDL coder in MATLAB which can do this task. The problem is that i don't have much information about Simulink HDL Coder. So please if anyone can tell me from where to start and can suggest any literature regarding this will be of great help to me.


Thanks in Advance
Regards
Hamid
0
9/2/2011 7:06:08 AM
comp.soft-sys.matlab 211266 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
963 Views

Similar Articles

[PageSpeed] 9

On 09/02/11 03:06, hamid wrote:
> Dear All,
>
> Hi, i am doing a project in which i have to convert MATLAB coding into
> Verilog HDL Coding or only HDL coding. I am familiar with the FPGA n
> also with the MATLAB but didn't have any idea about how to convert the
> coding. After searching for the respective topic i came to know that
> there is a simulink HDL coder in MATLAB which can do this task. The
> problem is that i don't have much information about Simulink HDL Coder.
> So please if anyone can tell me from where to start and can suggest any
> literature regarding this will be of great help to me.

A good place to start is the product page for Simulink HDL Coder: 
http://www.mathworks.com/products/slhdlcoder/?s_cid=HP_FP_SL_simhdl .  You can use the 
'ver' command to see if you have Simulink HDL Coder installed and available, if you are 
unsure:

To find out all the MathwWorks products you have available:

 >> ver

To see specifically just about Simulink HDL Coder:

 >> ver hdlcoder


-- 
Tim McBrayer
MathWorks

0
9/6/2011 4:56:05 PM
Tim McBrayer <Tim.McBrayer@mathworks.com> wrote in message <j45jb6$4h7$1@newscl01ah.mathworks.com>...
> On 09/02/11 03:06, hamid wrote:
> > Dear All,
> >
> > Hi, i am doing a project in which i have to convert MATLAB coding into
> > Verilog HDL Coding or only HDL coding. I am familiar with the FPGA n
> > also with the MATLAB but didn't have any idea about how to convert the
> > coding. After searching for the respective topic i came to know that
> > there is a simulink HDL coder in MATLAB which can do this task. The
> > problem is that i don't have much information about Simulink HDL Coder.
> > So please if anyone can tell me from where to start and can suggest any
> > literature regarding this will be of great help to me.
> 
> A good place to start is the product page for Simulink HDL Coder: 
> http://www.mathworks.com/products/slhdlcoder/?s_cid=HP_FP_SL_simhdl .  You can use the 
> 'ver' command to see if you have Simulink HDL Coder installed and available, if you are 
> unsure:

> 
> To find out all the MathwWorks products you have available:
> 
>  >> ver
> 
> To see specifically just about Simulink HDL Coder:
> 
>  >> ver hdlcoder
> 
> 
> -- 
> Tim McBrayer
> MathWorks


Dear McBrayer,

Thanks a lot for the reply. Can you please guide me that is this possible that can i convert simple MATLAB coding into Verilog HDL coding,means without using Simulink and Embedded Matlab feature. i have already an image encryption code in MATLAB and i have to convert that code. is this possible?

Thanks 
0
9/16/2011 2:55:14 AM
On 09/15/11 22:55, hamid wrote:
>
> Thanks a lot for the reply. Can you please guide me that is this
> possible that can i convert simple MATLAB coding into Verilog HDL
> coding,means without using Simulink and Embedded Matlab feature. i have
> already an image encryption code in MATLAB and i have to convert that
> code. is this possible?

The only current design flow with MathWorks tools for converting MATLAB code to HDL 
requires the use of Simulink, the MATLAB Function block, and Simulink HDL Coder.

Regards,
-- 
Tim McBrayer
MathWorks

0
9/16/2011 4:39:55 PM
"hamid " <hamid_lukhnowi@yahoo.com> wrote in message <j3pv90$lak$1@newscl01ah.mathworks.com>...
> Dear All,
> 
> Hi, i am doing a project in which i have to convert MATLAB coding into Verilog HDL Coding or only HDL coding. I am familiar with the FPGA n also with the MATLAB but didn't have any idea about how to convert the coding. After searching for the respective topic i came to know that there is a simulink HDL coder in MATLAB which can do this task. The problem is that i don't have much information about Simulink HDL Coder. So please if anyone can tell me from where to start and can suggest any literature regarding this will be of great help to me.
> 
> 
> Thanks in Advance
> Regards
> Hamid


Hello hamid, I would like to know how you went about your design using MATLAB HDL coder. I am faced with the same challenge of converting my model in Simulink to Verilog HDL. thanks.
0
manie
4/1/2016 8:53:03 PM
Reply:

Similar Artilces:

'Matlab Code' to 'Embedded Matlab fun code'
Dear friends, I have a Matlab code to process a pure analog signal 'u'. Now I want to implement it in Simulink and I want to use it in 'Embedded Matlab fun block' so i need to transform 'Matlab code' to 'Embedded Matlab fun code' to perform the task. The Matlab code is as follows: %%%%%%%%%%%%%%%%%%%%% u_abs = abs(u); major_th = 1.5e-1; minor_th = 1.8e-2; major_peak_value = []; minor_peak_value = []; pos = 1; pos_max = 1; while ~isempty(pos) [m pos_max(end+1)] = max( u_abs( pos : pos + 10) ); pos_max(end) = pos_max(end) + pos - 1; if m > major_th major_peak_value(end+1) = m; else minor_peak_value(end+1) = m; end % exit the peak pos = find(u_abs(pos:end) < minor_th, 1 , 'first') + pos-1; % Find the beginning of the next peak pos = find(u_abs(pos:end) > minor_th, 1 , 'first') + pos-1; end pos_max(2) = []; plot(u); hold on; plot(pos_max,u(pos_max),'ro'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I think i don't need this plot command as I will see the result in the scope directly. Any suggestion will be very useful. Thanking you! Prashant "Prashant Sandhi" wrote in message <jafvj8$soq$1@newscl01ah.mathworks.com>... > Dear friends, > > I have a Matlab code to process a pure analog signal 'u'. Now I want to implement it in Simu...

Trellis code in matlab code
Hi All Do you have some matlab code for the STTC which will give me some Idea. Any helping material or URL regarding the same will kindly be sent to me. I shall be very thankful to you for this act. Regards Kelecha ...

matlab code for turbo code
please someone send me matlab code for turbo code...............on my email id wizynt.94@gmail.com ...

how to convert Matlab code to C code
Hi everyone, Can any one tell me how to convert matlab to c?? Regards. On 5/8/2012 4:36 PM, WMS wrote: > Hi everyone, > Can any one tell me how to convert matlab to c?? > > Regards. http://www.mathworks.com/products/matlab-coder/ "MATLAB Coderâ„¢ generates standalone C and C++ code from MATLAB code" ...

converting matlab code to C code
when i tried to convert the matlab code into c code using matlab coder i got below mentioned error, I am using R2011b(7.13.0.534) my program uses image as an input parameter. ERROR: >> coder -build len.prj ??? This text contains non-empty top-level expressions. It appears to be a script. Error in ==> length_of_line Line: 1 Column: 1 Code generation failed: Open error report. CODE: I=imread('pic29rkey.jpg'); imshow(I);pause hold on [x,y] = ginput(2); line(x,y,'color','r','LineWidth',5); Ired_length = sqrt ((x(2)-x(1))^2 + (y(2)-y(1))^2); [x,y] = ginput(2); line(x,y,'color','g','LineWidth',5); lineLength = sqrt ((x(2)-x(1))^2 + (y(2)-y(1))^2); Igreen_length= lineLength/Ired_length*10; disp(Igreen_length); msgbox(sprintf('Length of the Key is %f cm',Igreen_length)); How to solve this issue? this is the first time i am using this code conversiuon tool thats why! Thanks in advance... "arunkumar " <arun.pk2k3@gmail.com> wrote in message news:jnm1kd$pog$1@newscl01ah.mathworks.com... > when i tried to convert the matlab code into c code using matlab coder i > got below mentioned error, I am using R2011b(7.13.0.534) my program uses > image as an input parameter. > > ERROR: >>> coder -build len.prj ??? This text contains non-empty top-level >>> expressions. It appears to be a script. Error in ==> length_of_line >>> Lin...

Help me to convert the C++ code to Matlab code
Some one Help me to convert the following C++ code to Matlab code for(init x=-5; x++ ; x<=10) { if (x<=0) y=2; else y=3 * x; plot (x,y) } ...

how to generate VERILOG code from MATLAB
hello guys, i'd like to learn how to generate VERILOG code from and existing matlab/simulink design. i'd be really happy to get some reference about this topic. thanks ...

MATLAB Code for simualting the spreading using Walsh Codes
A = [-1 -1 1 1]; %Spread waveform representation of user A's signal B = [-1 1 -1 1]; %Spread waveform representation of user B's signal C = [1 1 -1 -1]; %Spread waveform representation of user C's signal % Generating the code and its timing sequence: % to generate a 4 x 4 Hadamard matrix (which is the matrix of 1's and -1's % and the columns are orthogonal): N = 4; H = hadamard(N); % Picking full second row of Hadamard matrix: cA = H(2,:); % Picking full third row of Hadamard matrix: cB = H(3,:); % Picking full fourth row of Hadamard matrix: cC = H(4,:); % Number of samples per chip: Tc_samp = ones(1,4); % Initializing empty matrices: codeA = []; codeB = []; codeC = []; for k = 1 : length(cA) codeA = [codeA cA(k)*Tc_samp]; codeB = [codeB cB(k)*Tc_samp]; codeC = [codeC cC(k)*Tc_samp]; end codeA % Generation of Tx Data: Tx_data = []; for k = 1 : length(A) uA = A(k)*codeA; uB = B(k)*codeB; uC = C(k)*codeC; Tx_data = [Tx_data uA+uB+uC]; end Tx_data NN = length(Tx_data) uAb = []; uBb = []; uCb = []; for k = 1 : NN / 16 index = (k - 1)*NN/4 + 1 : k*NN/4; uAb = [uAb sum(Tx_data(index).*codeA)]; uBb = [uBb sum(Tx_data(index).*codeB)]; uCb = [uCb sum(Tx_data(index).*codeC)]; end uAb % Error: res1 = A-uAb/16; res2 = B-uBb/16; res3 = C-uCb/16; note: please help me in understanding each statement of ...

matlab code for video coding format h.263
I urgently require the complete matlab code for video codec H.263 for my m.tech project . It can be either using DCT or wavelet transform. can u help me? thanks a lot........ ...

matlab code for video coding format h.263 #2
HI , I M DOING MY M.TECH PROJECT ON H.263 .CAN ANYBOBY HELP ME WITH SOURCE CODE FOR IT USING EITHER DCT TRANSFORM OR WAVELET TRANSFORM. PLEASE REPLY IMMEDIATELY IF ANYBODY KNOWS. ITS URGENT. THANKS A LOT! ...

What does this matlab code do?
Hello, I have had the dubious distinction of inheriting tons of matlab code from a former student (and he is gone, of course) and am trying to figure out what it is doing. There is a particular code segment that has me stumped and I was wondering if someone can help me figure out what it actually does: So, I have an array P that holds the joint PDF for 2 random variables. So, the statement is: a = 1 - cumsum(P,1)./repmat(sum(P,1),[number_of_hist_bins 1]); number_of_hist_bins is the number of bins of the joint histogram in any given dimension. So, the 1-cumsum(P, 1) is somehow maybe the reliability/survival function. So if P is a joint PDF then summing along the dimensions would give the marginal PDFs and cumulative summing would give the CDF and 1-CDF is the survival function from what I could find on wikipedia. However, I have no idea what the division by repmat(sum(P,1), [number_of_hist_bins 1]) is doing... I have a feeling that this is some sort of marginalisation but I cannot convince myself. sum(P, 1) is the marginal PDF, so there is a normalisation of the CDF with the PDF going on but I cannot fathom to what end... I was wondering if anyone here has seen this sort of thing before and maybe it some standard definition that I might have missed. I would be really grateful if someone can help me figure it out... Many thanks, Anja "anja.ende@googlemail.com" <anja.ende@googlemail.com> wrote in message <7dc43dab-b...

matlab source code of MAP decoder for block codes to share?
Hi, I need to run some simulations results of MAP decoding of BLOCK codes. Has anyone has source code(matlab) of such MAP decoder for block codes t share? Or can someone kindly provide me information on where I can ge such source code? Your help is greatly appreciated. Thanks a lot! kc This message was sent using the Comp.DSP web interface o www.DSPRelated.com kc <lkc_pringles@hotmail.com> wrote: >I need to run some simulations results of MAP decoding of BLOCK codes. >Has anyone has source code(matlab) of such MAP decoder for block codes to >share? Or can someone kindly provide me information on where I can get >such source code? > >Your help is greatly appreciated. I don't have the answer to your question, but I'm curious what sort of block codes you'd like to MAP-decode. It's practical for small Hamming codes. A few years back near-MAP decoding of Hamming constituent codes in a turbo code configuration was popular for awhile, so you could try searching for those implementations. Steve >kc <lkc_pringles@hotmail.com> wrote: > >>I need to run some simulations results of MAP decoding of BLOCK codes. >>Has anyone has source code(matlab) of such MAP decoder for block code to >>share? Or can someone kindly provide me information on where I can get >>such source code? >> >>Your help is greatly appreciated. > >I don't have the answer to your question, but I'm curious ...

matlab code for video coding format h.263 #3
HI , I M DOING MY M.TECH PROJECT ON H.263 .CAN ANYBOBY HELP ME WITH SOURCE CODE FOR IT USING EITHER DCT TRANSFORM OR WAVELET TRANSFORM. PLEASE REPLY IMMEDIATELY IF ANYBODY KNOWS. ITS URGENT. THANKS A LOT! ...

Conversion from a MATLAB code to a C code used by a DSP processor
Hello, I need to implement image processing in a Digital Signal Processor. I have a code ready in MATLAB, I have tried using MATLAB Coder, but its unable to go past the first line: the imread() function. I have installed the C compiler from MATLAB and that is all. How do I go about the whole of the conversion process? Do I need to install something else? ...

some problems of codes of MATLAB 7.0 working on MATLAB 6.5
I have used MATLAB for few hours.So I don't know the differences between version 6.5 and 7.0.I want to use some codes of MATLAB 7.0, but they doesn't work in MATLAB 6.5.How to change these codes so that they can work in matlab 6.5.Waiting for your help. Thank you . The codes are like this .I think changing the function findPI may work ,but I don'y know how % PIfun.m % Evaluate a function used to find the PI-line, using Kyle Champley's % method. % % Adam Wunderlich % last update: 5/18/06 function y = PIfun(r,R,h,gamma,x3,sb) temp = R - r*cos(gamma-sb); y = h*((pi - 2*atan(r*sin(gamma-sb)/temp))*(1 + (r^2 - R^2)/ (2*R*temp)) ... + sb) - x3; % find_PI_Line.m % % Find the the parametric interval corresponding to the unique PI-line % passing through the point x for a given helical pitch. % This code implements the method of Kyle Champley. % inputs: P = pitch (cm/turn), R = helix radius, delta_s = s stepsize, x % output: PI = [sb st] % % Adam Wunderlich % last update: 5/18/06 function [PI] = findPI(P,R,delta_s,x) h = P/(2*pi); r = sqrt(x(1)^2+x(2)^2); gamma = atan2(x(2),x(1)); options = optimset('TolX',h*delta_s/100,'FunValCheck','on'); [sb,fval,exitflag] = fzero(@(sb) PIfun(r,R,h,gamma,x(3),sb),... [(x(3)-h*pi)/h,x(3)/h],options); if exitflag ~=1, disp('Error: PI invalid'); end % note that beta=sb in Kyle's formula alphaX = atan(r*sin(gamma-sb)/(R - r*cos(gamma-sb))); st = sb + pi -...

soft decoding of conv. codes using vitdec matlab func. #2
Hello, Isnt 'unquant' and 'soft' options essentially same?..in both case vitdec takes in "real numbers" as input (ok they are "mapped" in case o 'soft' option)..so can we not use 'unquant' option to carry out sof decoding?...my preliminary results show that 'unquant' option give me 2- db gain over hard decoding... any one having insight please let me know. thanks >Hello, > Isnt 'unquant' and 'soft' options essentially same?..in both cases >vitdec takes in "real numbers" as input (ok they are "mapped" in case of >'soft' option)..so can we not use 'unquant' option to carry out soft >decoding?...my preliminary results show that 'unquant' option give m 2-3 >db gain over hard decoding... >any one having insight please let me know. >thanks > > %%% Yes , u can use 'unquant' as soft decoding. try to implement for k=3 i.e [5 7] and BPSK and at roughly 4 dB u should get BER of 10^-3. Chintan ...

Shall i use the misrosoft Visual c++ code from a m-file generated from matlab in Visual C++ with out matlab runtime environment
undefined ...

MATLAB code #43
please help me with the code for this paper. "Image Enhancement by wavelet based thresholding neural network with adaptive learning rate". I ll will you if you need. Urgent... On Mar 15, 5:11=A0am, "Dinesh " <dinesh11...@yahoo.com> wrote: > please help me with the code for this paper. "Image Enhancement by wavele= t based thresholding neural network with adaptive learning rate". I ll will= you if you need. Urgent... --------------------------------------------------- You will what? Pay someone as a consultant to code up the algorithm in the paper for you? ...

matlab code for FDTD
Dear Friends i would like to ask you if there a matllab code based in FDTD methods to solve the following problem : A unifrom transmission line (two parallel wires) excited by an arbitary external fileld. Thank you in advance George ...

code for DIP in matlab
i m undergraduate telecom engr. for my final year project i need a matlab code to do real time image processing attendance system.... it is part of my project...... ...

huffman coding matlab
anyone know about the compression image coding using matlab huffman? On Aug 5, 2:50=A0am, "rizqi " <rizqi.hendr...@gmail.com> wrote: > anyone know about the compression image coding using matlab huffman? yes, me ...

error in matlab code
sir, i have written the following code to genrate .coe file.the code is clear all N = 65; B = 16; % bits w = hamming(N);-<-------- error shows. Error in ==> hamming at 4 w = hamming(N); winscaled = round(w.*(2^(B-2)/max(w))); filename = 'window_coeff.coe'; fid = fopen(filename,'wt'); fprintf(fid,'memory_initialization_radix=16;\n'); fprintf(fid,'memory_initialization_vector=\n'); for i=1:N fprintf(fid,'%d,\n', w(i)); end fprintf(fid,'%d;\n', w(N)); fclose(fid); but i get error which is mentioned above. plz help me. "debalina ghosh" wrote in message <j5skgq$al2$1@newscl01ah.mathworks.com>... > sir, > > i have written the following code to genrate .coe file.the code is > clear all > N = 65; > B = 16; % bits > w = hamming(N);-<-------- error shows. Error in ==> hamming at 4 > w = hamming(N); > winscaled = round(w.*(2^(B-2)/max(w))); > filename = 'window_coeff.coe'; > fid = fopen(filename,'wt'); > fprintf(fid,'memory_initialization_radix=16;\n'); > fprintf(fid,'memory_initialization_vector=\n'); > for i=1:N > fprintf(fid,'%d,\n', w(i)); > end > fprintf(fid,'%d;\n', w(N)); > fclose(fid); > but i get error which is mentioned above. plz help me. Hi, if you are getting an er...

matlab coding #6
i m 1st year m.tech student of computer science my project is automatic speech recognition please send me matlab code.............to ......nirjala28@gmail.com...........thanx On 9/10/2011 11:43 AM, Nirjala kumari wrote: > i m 1st year m.tech student of computer science my project is automatic speech > recognition please send me matlab code.............to ......nirjala28@gmail.com...........thanx In real life, people first write something called product specifications or functional specification before they start 'coding'. I assume that you did that? How about posting it so that one knows that the 'code' they are sending you meets the specifications and requirements that you are asking for? No one wants to send you 'code' that does not meet your exact specifications as it will be a waste of your time to do that. --Nasser ...

MATLAB Code #44
Hey i need to use MATLAB to input audio files like sounds and then compare them? Any idea how i can compare them and fine the percentage of error? Would anyone recommend the use of a spectogram? If so at what sampling frequency?? ...

Web resources about - MATLAB Coding to Verilog HDL Coding - comp.soft-sys.matlab

Verilog - Wikipedia, the free encyclopedia
Verilog , standardized as IEEE 1364 , is a hardware description language (HDL) used to model electronic systems. It is most commonly used in ...

Troubleshooting Verilog
I want to squash a bug as a way to show how you "debug" Verilog hardware designs (or, at least, one way to do so)

Learning Verilog for FPGAs: Flip Flops
Last time I talked about how to create an adder in Verilog with an eye to putting it into a Lattice iCEstick board. The adder is a combinatorial ...


Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

DesignStart for Processor IP - ARM
... portal containing comprehensive online access to ARM IP. The DesignStart for Processor IP portal provides free access to gate-level Verilog ...

Engineer, Staff ASIC Design
Engineer, Staff ASIC Design job in Santa Clara, California, US. Read the Engineer, Staff ASIC Design job description and find other Marvell Semiconductor ...

Azuray Technologies Job Postings and Career Opportunities
Azuray maximum power point tracking solar solutions increased solar energy generation in real world conditions, without the need for supporting ...

Bare Bones Software - Display Features
Bare Bones Home Company Products Support Discuss Store Contact BBEdit Yojimbo Yojimbo for iPad TextWrangler Display Features BBEdit Feature Tour ...

TextWrangler 4.0 wrestles up new OS X features auto-reload, full-screen
... name of the file instead of browsing for it manually. Programmers will be pleased to see switchable syntax colour schemes, support for Verilog ...

Resources last updated: 3/30/2016 5:08:03 PM