- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
My baremetal NIOS application is writing to 32bits registers in the FGPA via AVALON bus.
The code is:
void GwbrWriteWord32 (alt_u32 Offset, alt_u32 Data)
{
IOWR_32DIRECT (0, Offset,Data);
}
void WriteMyRegister (alt_u32 Val)
{
GwbrWriteWord32 (MY_OFFSET, Val);
}
int main (void)
{
WriteMyRegister (17);
WriteMyRegister (17);
return 0;
}
I measured the time required to execute "WriteMyRegister" with Quartus and got 146 clock ticks. The clock is 100MHz so the time is: 1.46usec
Does it make sense ? It seems very slow.
Do you think I can make it faster by changing the code ?
Thank you,
Zvika
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The long latency that you got is correct due to the fact that IOWR_32DIRECT is bypassing data cache.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page