UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor markus1201
Visitor
11,066 Views
Registered: ‎08-31-2014

howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

Hi!

 

I'm using an Artix 7 with Vivado. Is it possible to change a ROM64X1 content or LUT6 logic function after a design has been implemented (placed and routed)?

 

best regards

Markus

0 Kudos
1 Solution

Accepted Solutions
Historian
Historian
19,643 Views
Registered: ‎01-23-2009

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

The answer is complicated...

 

In project mode, the answer is sort of "no" - it isn't a normal part of the flow.

 

However, you can do it in non-project mode. With the design in memory you simply modify the INIT property of the LUT using the set_property command

 

set_property INIT <value> [get_cells <cell>]

 

Once you have done this you can do a write_checkpoint to write out the new design, or a write_bitstream to generate the new bitfile.

 

(And now we get into dangerous territory). You can do this in project mode by "cheating". Once you have your implemented design, you can open it to bring it in memory. With it in memory, you can do the above steps - change the INIT with the set_property and write out a checkpoint or write a bitstream. However, there is no way to get these changes to go "back" into your project - your project will always have the old INIT value and you will manually have to manage anything moving forward from this (using a checkpoint outside the project).

 

The only way to change the value in your project is to do as @pratham suggested - change it in the RTL and re-synthesize and re-implement.

 

Avrum

8 Replies
Scholar pratham
Scholar
11,056 Views
Registered: ‎06-05-2013

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

Hello,

No, you have to re-run the implementation again with the updated INIT value.

 

You can edit the INIT value but once saved the init value, design will go out-of date and you have to re-run it.

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Instructor
Instructor
11,054 Views
Registered: ‎08-14-2007

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

That's surprising.  In ISE you could use the FPGA editor to change the LUT content, although it's not all that easy.  Still if you have a design that takes hours to implement, it could save time.

-- Gabor
0 Kudos
Visitor markus1201
Visitor
11,031 Views
Registered: ‎08-31-2014

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

How about locating the bits in the Bitstream and patching them?

 

best regards

Markus

0 Kudos
Historian
Historian
19,644 Views
Registered: ‎01-23-2009

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

The answer is complicated...

 

In project mode, the answer is sort of "no" - it isn't a normal part of the flow.

 

However, you can do it in non-project mode. With the design in memory you simply modify the INIT property of the LUT using the set_property command

 

set_property INIT <value> [get_cells <cell>]

 

Once you have done this you can do a write_checkpoint to write out the new design, or a write_bitstream to generate the new bitfile.

 

(And now we get into dangerous territory). You can do this in project mode by "cheating". Once you have your implemented design, you can open it to bring it in memory. With it in memory, you can do the above steps - change the INIT with the set_property and write out a checkpoint or write a bitstream. However, there is no way to get these changes to go "back" into your project - your project will always have the old INIT value and you will manually have to manage anything moving forward from this (using a checkpoint outside the project).

 

The only way to change the value in your project is to do as @pratham suggested - change it in the RTL and re-synthesize and re-implement.

 

Avrum

Visitor markus1201
Visitor
11,018 Views
Registered: ‎08-31-2014

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

@avrumw: many thanks, it seams to work like this.

 

I used set_property and write_bitstream in project mode. When changing  the INIT value, the new bitstream differs from the original and when I change it back it is the same again. Is there a way to open a bitstream to verify the results?

 

best regards

Markus

0 Kudos
Historian
Historian
11,015 Views
Registered: ‎01-23-2009

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

Markus,

 

No, there is no way to "open" a bitstream. The bitstream is specifically (and only) the configuration information for the FPGA. It is not meant to be readable by anything other than (originally) iMPACT and now by the hardware manager in Vivado (whose only use for it is to download it to the FPGA).

 

The bitsream is not just a different representation of the design - specifically, it is no longer a "netlist" - its just the configuation bits. As such there is really no reason any other tool would want to open it, and (therefore) no such mechanism exists.

 

Avrum

0 Kudos
Instructor
Instructor
11,002 Views
Registered: ‎08-14-2007

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution

@markus1201 wrote:

How about locating the bits in the Bitstream and patching them?

 

best regards

Markus


As you already found out, you can diff the bitstream before and after the changes, and presumably with enough INIT values you could figure out which bit goes where in the bitstream (for a particular placement of the LUT or ROM64).  And then you will find that you also need to update the CRC fields or the device will not accept the modified bitstream.  All in all, it seems the solution you have is hte simplest.  Is this something you are trying to automate so you can change it "in the field" without the Vivado tools?

-- Gabor
0 Kudos
Visitor markus1201
Visitor
10,941 Views
Registered: ‎08-31-2014

Re: howto change a ROM64X1/LUT6 INIT value after implementation

Jump to solution
Being able to modify in the field without using the Vivado tools would be great, but right now I'm happy to have a solution at all.

best regards
Markus
0 Kudos