im正在查找systemc库中的"risc-cpu"代码(特别是"example"文件夹(,但我不明白<lt;main.cpp中的操作是。在main.cpp中,它们实例化每个模块并执行<lt;具有多个sc_signal变量的操作。我认为这有点像绑定操作,但我想确切地知道。
以下是来自main.cpp 的一些代码
fetch IFU("FETCH_BLOCK"); //instiate module fetch
IFU.init_param(delay_cycles); //module fetch delay for delay_cycles
IFU << ram_dataout << branch_target_address << next_pc << branch_valid
<< stall_fetch << intreq << vectno << bios_valid << icache_valid
<< pred_fetch << pred_branch_address << pred_branch_valid << ram_cs << ram_we
<< addr << ram_datain << instruction << instruction_valid << program_counter
<< intack_cpu << branch_clear << pred_fetch_valid << reset << clk;
decode IDU("DECODE_BLOCK"); //instanciate module decode as IDU
IDU << reset << instruction << pred_instruction << instruction_valid
<< pred_inst_valid << out_valid << destout << dout << dram_dataout
<< dram_rd_valid << destout << fdout << fout_valid << fdestout
<< branch_clear << dsp_data_valid << program_counter << pred_on
<< branch_instruction_address << next_pc << branch_valid
<< branch_target_address << mem_access << mem_address << alu_op
<< mem_write << alu_src << reg_write << src_A << src_B << forward_A
<< forward_B << stall_fetch << decode_valid << float_valid << mmx_valid
<< pid_valid << pid_data << clk;
<<
是标准的左移运算符,在C++中,它被重载,也可以用作输入流。在我看来,他们只是在给IFU
和IDU
写很多值。