cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timoteo.gb
Adventurer
Adventurer
3,573 Views
Registered: ‎12-30-2015

[Synth 8-27] complex assignment not supported

Jump to solution

Hi, 

 

I'm trying to create a generic input FIFO, and generic output FIFO, to use them as a package of a project.

I made a testbench, and everything works fine. Creating the package, and mapping the components in my design, I realized that Vivado doesn't let me synthesize it.

 

Trying to synthesize the single component, Vivado points out: [Synth 8-27] complex assignment not supported.

 

The code:

............
process (clk)
begin

    if rising_edge(clk) then
        if reset = '1' then
           ........
        else
            if (ReadEn = '1') then
                if (Head = 0) then
                    -- Update data output				
					Reg_Data(READ_Y downto READ_X) <= Memory(Tail);
                    -- Update Tail pointer as needed
                    if .....
.............
.............
READ_Y  <= ((Tail + 1)*DATA_WIDTH) - 1;
READ_X  <= READ_Y - (DATA_WIDTH - 1);

The error appears at the bold line, due to the assignment of READ_Y and READ_X.

This signals are updated out of the process.

DATA_WIDTH, Tail, READ_Y, etc, are all integers. I tried declaring all of them as natural too, and it doesn't make any difference.

 

Any help?

 

Regards,

Timoteo

0 Kudos
1 Solution

Accepted Solutions
timoteo.gb
Adventurer
Adventurer
5,614 Views
Registered: ‎12-30-2015

I solved it.

 

I directly applied the "algorithm" within the range of the vector.

Remember that I'm moving data to different ranges of a std_logic_vector, but the size of the vector is not dynamic, it's a fixed value determined by generics.

Still, I was trying to move data from the memory to different spaces of the register, and to do that, the ranges are dynamic.

 

Code that works:

 

............
process (clk)
begin

    if rising_edge(clk) then
        if reset = '1' then
           ........
        else
            if (ReadEn = '1') then
                if (Head = 0) then
                    -- Update data output				
					Reg_Data((((Tail + 1)*DATA_WIDTH) - 1) downto (((Tail + 1)*DATA_WIDTH) - 1 - (DATA_WIDTH - 1))) <= Memory(Tail);
                    -- Update Tail pointer as needed
                    if .....
.............
.............

Regards,

Timoteo

View solution in original post

0 Kudos
3 Replies
jmcclusk
Mentor
Mentor
3,564 Views
Registered: ‎02-24-2014

your problem is that READ_X and READ_Y must be static values, not signals... it's the object class (constant vs signal) that is your problem, not the type.   It will work if you define READ_X and READ_Y as constants (or as generics).

 

The underlying operation you are trying to do is a variable width read from the memory... and that's simply not possible to do dynamically.    All memory read and write operations must be a static width.   Of course, the static width can be defined by generics or constants at elaboration time.   

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
timoteo.gb
Adventurer
Adventurer
3,558 Views
Registered: ‎12-30-2015

Hi,

 

Thanks for your reply.

The problem is that READ_Y depends on "Tail", which changes synchronously with the clock. I can't declare READ_Y as a constant.

 

Regards.

0 Kudos
timoteo.gb
Adventurer
Adventurer
5,615 Views
Registered: ‎12-30-2015

I solved it.

 

I directly applied the "algorithm" within the range of the vector.

Remember that I'm moving data to different ranges of a std_logic_vector, but the size of the vector is not dynamic, it's a fixed value determined by generics.

Still, I was trying to move data from the memory to different spaces of the register, and to do that, the ranges are dynamic.

 

Code that works:

 

............
process (clk)
begin

    if rising_edge(clk) then
        if reset = '1' then
           ........
        else
            if (ReadEn = '1') then
                if (Head = 0) then
                    -- Update data output				
					Reg_Data((((Tail + 1)*DATA_WIDTH) - 1) downto (((Tail + 1)*DATA_WIDTH) - 1 - (DATA_WIDTH - 1))) <= Memory(Tail);
                    -- Update Tail pointer as needed
                    if .....
.............
.............

Regards,

Timoteo

View solution in original post

0 Kudos