Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

Question on "associatedClock" property of Avalon Slave

Altera_Forum
Honored Contributor II
1,365 Views

I am looking at generating a custom block of VHDL code that ideally will be seamless integration into the SOPC builder system. As I am reading the Avalon spec, I see the description for the "associatedClock" and I am reading it as a definition for a generic port. Since I am creating multiple components and the system may have as many as 7 different clocks, should I be creating a generic port mapping for this?

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
312 Views

For any component you need to have a clock interface. This clock interface you wire up your component clk and reset to. You can have multiple clocks for a single component by simply creating multiple clock interfaces. 

 

Now for the other interfaces such as masters, slaves, sources, sinks, etc... you have to tell the tools what clock to associate the port to. So if I had a clock interface called "my_clock" and a slave interface called "my_slave" in component editor you would use "my_clock" as the associated clock for "my_slave". The tools will use this to figure out what clock domain your slave port is on so that it can determine if there is a clock crossing between it and the master hooked up to it. 

 

In component editor if you click on the templates you can see this for yourself if you add the slave template. You should see it create the interfaces and signals for a typical slave port with an associated clock.
0 Kudos
Altera_Forum
Honored Contributor II
312 Views

Okay, but let's say that I am not using component editor or the templates. How do I set this property? 

 

I ask this question because I am involved with a project that my teammates are very reluctant to use anything remotely SOPC builder based. They feel that building the system via quartus will be less risk, but they still want to infer Avalon and Nios.
0 Kudos
Altera_Forum
Honored Contributor II
312 Views

It is a property of the component .tcl file. Here is the .tcl API: http://www.altera.com/literature/hb/qts/qts_qii54022.pdf 

 

I write a lot of components and I always start by using component editor and then make manual changes to the .tcl file after if needed. This saves me a few hundred lines of .tcl coding. Everything you need to write the .tcl file from scratch is in the .tcl API documentation; however, I would highly recommend starting with component editor to save time and minimize coding mistakes. 

 

Before coding up the .tcl file I would check to make sure your IP has Avalon complaint interfaces. You can find the various interfaces and signals that belong to each in the Avalon spec: http://www.altera.com/literature/manual/mnl_avalon_spec.pdf
0 Kudos
Reply