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++

Multiple Clock

Altera_Forum
Honored Contributor II
1,078 Views

Hi everyone, 

 

I try to implement a system with multiple clock domains. The NIOS system run with 50 Mhz and some avalon components should run with 100 Mhz (DMA, FIFO, internal SRAM). SOPC Builder build this system without a problem. But during the "Analysis & Synthesis" I got several errors. So I have tried to build the system that is descriped in "Building Systems with Multiple Clock Domains" but the same errors occured.  

 

Has somebody made the same expericences ? Or build a working system with multiple clock domains.  

 

regards 

revolt
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
331 Views

Hi! 

I think you can try to get the other clocks from a fast clock by using PLL.
0 Kudos
Altera_Forum
Honored Contributor II
331 Views

The clock generation is not the problem. 

 

The clock-domain crossing logic that is created by the SOPC builder can not be synthesised or simulated.
0 Kudos
Altera_Forum
Honored Contributor II
331 Views

Add SignalTap II to the list as well. 

 

I used a seperate clock for a custom peripheral on a uKit board, it built and works fine. The periperhal clock was 1/3 slower than system. Both clocks originated from same PLL. 

 

Have you tried a faster clock for CPU and slower for other, just as a test?
0 Kudos
Altera_Forum
Honored Contributor II
331 Views

I found the problem during the sythesis. SOPC Builder creates for the clock domain crossing logic: 

 

endofpacket_bus_pipe : dma_0_control_port_slave_X_cpu_data_master_bus_pipe 

port map( 

data_out (31 DOWNTO 1) => open, 

data_out (0 downto 0) => internal_slave_endofpacket, 

clk1 => slave_clk, 

clk2 => master_clk, 

data_in => std_logic_vector'("0000000000000000000000000000000") & (A_TOSTDLOGICVECTOR(master_endofpacket)), 

reset_clk1_n => slave_reset_n, 

reset_clk2_n => master_reset_n 

); 

 

Quartus doen't like this line : data_out (0 downto 0) => internal_slave_endofpacket, 

after changing to data_out (0) => internal_slave_endofpacket, 

synthesis works without a problem, but modelsim show some other problems http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif  

 

@joelw: no I didn&#39;t try. But I will do.
0 Kudos
Altera_Forum
Honored Contributor II
331 Views

@joelw: Now my NIOS is fast then my fifo, but the errors are still the same.

0 Kudos
Altera_Forum
Honored Contributor II
331 Views

Hi there, 

 

I had the same problem. Make sure you are running the service pack for 4.2. This fixes things. 

 

Good Luck.
0 Kudos
Altera_Forum
Honored Contributor II
331 Views

hi sja, 

 

thx for the hint. Now synthesis runs without a problem. Did you try to simulate your design with Modelsim? 

There I get still errors.
0 Kudos
Altera_Forum
Honored Contributor II
331 Views

Hi there revolt, 

 

Sorry. I didn&#39;t go down the Modelsim path so I can&#39;t offer any suggestions there. 

 

I hope you work it out.  

 

Good luck 

 

sja
0 Kudos
Reply