05.07.2013 Views

Script for Laboratory: Designing embedded ASIPs - CES

Script for Laboratory: Designing embedded ASIPs - CES

Script for Laboratory: Designing embedded ASIPs - CES

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

amount : in std_logic_vector(7 downto 0);<br />

data_out : out std_logic_vector($msb downto 0)<br />

That is it <strong>for</strong> the block.<br />

Next, we have an section. It defines an entity in a different file, which is why a new<br />

block is needed, but the ports are the same, so use the code from the above listing.<br />

Estimation and the Synthesis model<br />

The section can be left empty, the script contains instructions to<br />

process the FHM file - we leave that untouched as well.<br />

The block has data relevant <strong>for</strong> area, power and delay estimations, but we use<br />

more accurate tools, that consider the actual application execution, as shown in Chapter 6.4,<br />

Chapter 6.5 and Chapter 7.2. Leave the estimation data there though, as ASIP Meister will<br />

complain without them. Should you change FHM parameters however, you will have to<br />

adjust the estimation section if you want to get rid of the warnings.<br />

That is it <strong>for</strong> the behavior model. As mentioned in the beginning, we won't differ between the<br />

behavior and the synthesis model, so just copy/paste the complete block and change<br />

the value of the tag from behavior to synthesis.<br />

Your FHM file should now have a structure similar to the following listing:<br />

<br />

<br />

rotator <br />

<br />

behavior <br />

[...]<br />

<br />

<br />

synthesis <br />

[...]<br />

<br />

<br />

You can now use the module in ASIP Meister. Instantiate the FHM resource in the Resource<br />

Declaration and write the new instruction rotl. Set the operands to the correct Addressing<br />

Mode, DataType, etc in the Behavior Description window, but leave the behavior description<br />

itself out.<br />

Use the syntax<br />

result = ROT0.rotl(source0, am);<br />

where result and source0 are 32-bit wires and am is a 8-bit wire.<br />

- 39 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!