顶层模块干嘛了?

2020-02-27 21:10发布

ERROR: The Top module has not been specified. This can happen if no sources have been added to the project,
or if you are using Manual Compile Order mode and have not entered the name of the top module in the Top Module field
这是啥错误?.
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
15条回答
jakfens
2020-02-29 07:54
module cpu(clk,rst,rd,wr,addr,data,opcode,fetch,ir_addr,pc_addr);
  input clk,rst;
  output rd,wr;
  output[4:0]addr;
  output[2:0]opcode;
  output fetch;
  output[4:0]ir_addr,pc_addr;
  inout[7:0]data;
  wire clk,rst;
  wire[7:0] data;
  wire[4:0]addr;
  wire rd,wr;
  wire fetch,alu_ena;
  wire[2:0] opcode;
  wire[4:0] ir_addr,pc_addr;
  wire[7:0] alu_out,accum;
  wire zero,inc_pc,load_acc,load_pc,load_ir;
  register m_register (.data(data),.load_ir(load_ir),.rst(rst),.clk(clk),.opcode(opcode),.ir_addr(ir_addr));
  accum m_accum (.data(alu_out),.load_acc(load_acc),.clk(clk),.rst(rst),.accum(accum));
  alu m_alu (.zero(zero),.data(data),.accum(accum),.clk(clk),.opcode(opcode),.alu_out(alu_out));
  machine m_machine (.inc_pc(inc_pc),.load_acc(load_acc),.load_pc(load_pc),.load_dr(load_dr),.rst(rst),.fetch(fetch),.rd(rd),.wr(wr),.clk(clk),.load_ir(load_ir),.zero(zero),.opcode(opcode));
  adr m_addrchoose (.fetch(fetch),.ir_addr(ir_addr),.pc_addr(pc_addr),.addr(addr));
  counter m_counter (.inc_pc(inc_pc),.rst(rst),.ir_addr(ir_addr),.load_pc(load_pc),.pc_addr(pc_addr));
  fetch m_fetch (.clk(clk),.rst(rst),.fetch(fetch));
  dr m_dr (.data(data),.alu_out(alu_out),.clk(clk),.rst(rst),.load_dr(load_dr));
endmodule

我这个算不算顶层模块

一周热门 更多>