Matlab to RTL - Block RAM Enable
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Arun
il 30 Nov 2014
Commentato: krishna amar
il 5 Feb 2015
An array will get recognized as block RAM. So foo_ary(index) = write_value_at_index will write to the block RAM Question - how to use the enable of the block ram i.e. Above value should be written only when foo_ary_enable is '1'. So on certain index values the array should not be updated, what is the syntax for that? foo_ary_enable is calculated in another loop
0 Commenti
Risposta accettata
Girish Venkataramani
il 4 Dic 2014
Hi Arun,
I am from MathWorks. So, the example was written a while back. Many of the features were developed in later releases. The examples need to be updated - we have not yet done that.
Remember, if you want maximum efficiency (i.e., avoiding additional muxes etc), you should use the system object.
0 Commenti
Più risposte (1)
Girish Venkataramani
il 1 Dic 2014
HDL Coder supports mapping to RAMs in two ways: 1. Manual mapping using the hdl.Ram system object 2. Automatic mapping from MATLAB code
If you know exactly how the RAM should be connected, it may be better to use the manual approach. When using the hdl.Ram system object, you must fully specify all the port connections, including read-address, write-address, write-data and write-enable. See the documentation for an example of using hdl.RAM, but the following is a snippet of usage:
persistent hRam; if isempty(hRam)
hRam = hdl.RAM('RAMType', 'Dual port');
end
% execute single step of RAM
[~, ramRdDout] = step(hRam, ramWriteData, ramWriteAddr, ramWriteEnable, ramReadAddr);
However, you can also do this with the automatic approach. If you want to control using an enable line, all you may want to do is put it in a conditional:
if foo_ary_enable
foo_ary(index) = write_value;
end
2 Commenti
krishna amar
il 5 Feb 2015
Hi, I am unable to gernerate the VHDL test bench for the example code given On RGB to YUV convertion. Mtlab is running for long time but I am not getting the Output. I have got the VHDL code but unable to generate Test bench.Please help me with this...................
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!