There is a workaround:
Generate your component as you would using the wizard "Create new component" in SOPC.
Dont worry about your inabilty to control setup and hold times there.
After finishing all your other SOPC details: Generated the system.
Exit SOPC.
Open the generated PTF file located in your root directory. The PFT file is a text file.
Locate the section describing your component by searching for the name of your component: here
usermod MODULE usermod_0
{
class = "usermod";
class_version = "1.0";
.... removed stuff
}
}
SLAVE avalon_slave_0
{
SYSTEM_BUILDER_INFO
{
Bus_Type = "avalon";
Address_Width = "18";
Address_Alignment = "dynamic";
Data_Width = "32";
Has_Base_Address = "1";
Has_IRQ = "0";
Setup_Time = "1cycles";
Hold_Time = "2cycles";
Read_Wait_States = "3cycles";
Write_Wait_States = "4cycles";
Read_Latency = "0";
.... removed stuff
Correct the setup/hold and read/write wait states to whatever value you require. The example has, 1,2, 3 and 4 cycles, respectively. Notice that the pulse width for the strobes (read or write) is one cycle longer as the corresponding value in the PTF file. The example has a write pulse of 4+1=5 cycles. This is reasonable, as wait_state means additional time to wait with respect to the minimum which is 1 cycle!
Save the modified PTF file.
Start SOPC builder again.
Dont modify anything with the system, but move to the last tab and generate the system.
When done, exit SOPC.
Your system is now ready for synthesis etc. Now, with the expected su/ho,wait values.
Important: Remember to correct the PTF file manually if for any reason you change anything in the SOPC builder.
Any change in system configuration will create a new ptf file, and will thus overwrite your patch.
Warning: The "Create new component" wizard makes a directory in your root where it places you component, including its source files. Typically you would from "Create new component wizard" pick the source files from your root directory. Thats ok, but be warned that these files are no more the source for you user-logic. Your source is now in the component directory, so changing anything in the version in the root dir will have no effect. It will actually be overwritten when you generate your component.
Why would you want to change your source code once the component has been generated? Because of another inconvenience in the "Create new component" wizard: You cant edit an already built component. Only start from scratch.... and redo the PTF etc... So for changes which does not break the interface of the component its ok to edit the source in the component directory. Remember though to generate in SOPC builder afterwards.
Background note: The PTF file is a textual description of the SOPC system. This file is built/created/edited by the SOPC builder during the first tab's. On the last tab, when you select GENERATE, this description, together with all the source files, is used to create all the verilog/vhdl descriptions of the system (CPU, RAMs, UARTS, USERLOGIC,,, and not least the AVALON INTERFACE)
MiR:<div class='quotetop'>QUOTE </div>
--- Quote Start ---
This concerns Quartus / NIOS II Version 5.0.[/b]
--- Quote End ---
Its unfortunate if this inconvenient implementation of the "Create new component" wizard present in quartus 4.2 has not been corrected in quartus 5.0. Hopefully it will come in the next release of SOPC builder.
Tip: To check these issues, make a minimalistic system consisting of a NIOS II/s, ram, rom and your user logic where the relevant avalon-pins are copied to user side (export type). Pilot it with just a couple of lines of C code to read/write from your user component. Simulate in quartus, and watch the avalon signals in the simulator. Notice that you should refrain from using an uart, as this may result in very long simulation time before the avalon-access takes place.
I hope these suggestions helps you get going until a more sound solution is provided.