Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
Need Forum Guidance? Click here

Search our FPGA Knowledge Articles here.
18498 Discussions

Does using register structs affect timing at all (does fitter keep them together?)

Altera_Forum
Honored Contributor I
762 Views

Does declaring a register packed structure affect the layout of the registers? (and therefore timing?) 

 

For example, 

 

typedef struct packed { 

bit [31:0] ntp_time; 

bit [15:0] index; 

bit [15:0] value; 

bit [15:0] tag; 

} _mystruct; 

 

_mystruct table[64]; 

 

Does it matter to the fitter that I grouped all these elements together? Or would it be better to separate them instead: 

reg [63:0][31:0] ntp_time; 

reg [63:0][15:0] index; 

reg [63:0][15:0] value; 

reg [63:0][15:0] tag; 

 

Using data structures helps me stay organized, but I'm trying to find out if it affects my timing.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
49 Views

How you code it will make no difference. It is the register-register timing that matters - and this wont change when you change the code structure.

Reply