Article Details

ID: 3538
Case Type: faq
Category: Implementation
Related To: EPIC
Family: LatticeECP3

Search Answer Database

Is there an easy way to modify some Embedded Block RAM (EBR) data before running bitgen with encryption enabled?

To modify the Embedded Block RAM (EBR) data through command line, use medit command.

User can follow below steps-

1. Load the test project and check the path by using the "pwd" command in Tcl Console. By default, it navigates to the /test directory (for example D:/test; this may differ in various machines).

Change the path to point to the "impl" directory, such as D:/test/test.

As an example, before updating the path, you were in D:/test. After cd test ("impl" directory of project) you will have D:/test/test.

Note: The path changes depending on where you locate the project.

2. Once you are in the implementation directory, use the following command to find out the instance name.

Command syntax: (ncdread [ [-o ]). For example ncdread test_test.ncd -o ncdout.out

Wait for \u201Cncdout.out\u201D to be generated and search for the instance name. (For the procedure on how to find the 
instance name, check the \u201CReading NCD files\u201D section of the Diamond Help).

3. Once the instance name is found, use the command below to update the memory content.

Command syntax: medit [-i ] [-o ] [-format ] [] [] []. For example: medit -I <instance name> -o newncd.ncd -format BIN init.mem test_test.ncd t2.lpc

After running the above command, you should be able to see the updated *.ncd file with the \u201Cnewncd.ncd\u201D file name.

4. With the new updated ncd file, you can generate the bitstream with encryption option.

You can also create a simple batch script and run it with the test project to edit Memory Content, generate an ncd and with the updated ncd, generate an encrypted bitstream *.bat is located in the test project file directory.
Like most websites, we use cookies and similar technologies to enhance your user experience. We also allow third parties to place cookies on our website. By continuing to use this website you consent to the use of cookies as described in our Cookie Policy.