⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aramb36_internal.v

📁 DDR2源代码 DDR2源代码 DDR2源代码
💻 V
📖 第 1 页 / 共 5 页
字号:
	    36 : begin 		     if (BRAM_SIZE == 18 && BRAM_MODE == "TRUE_DUAL_PORT") begin			 $display("Attribute Syntax Error : The attribute WRITE_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", WRITE_WIDTH_B);			 $finish;		     end		 end	    72 : begin		     if (BRAM_SIZE == 18) begin			 $display("Attribute Syntax Error : The attribute WRITE_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", WRITE_WIDTH_B);			 $finish;		     end		     else if ((BRAM_SIZE == 16 || BRAM_SIZE == 36) && BRAM_MODE == "TRUE_DUAL_PORT") begin			 $display("Attribute Syntax Error : The attribute WRITE_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9, 18 or 36.", WRITE_WIDTH_B);			 $finish;		     end	         end	    default : begin		          if (BRAM_SIZE == 18) begin			      $display("Attribute Syntax Error : The attribute WRITE_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", WRITE_WIDTH_B);			      $finish;			  end			  else if (BRAM_SIZE == 16 || BRAM_SIZE == 36) begin			      $display("Attribute Syntax Error : The attribute WRITE_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9, 18 or 36.", WRITE_WIDTH_B);			      $finish;			  end	               end	endcase // case(WRITE_WIDTH_B)		case (READ_WIDTH_A)	    0, 1, 2, 4, 9, 18 : ;	    36 : begin 		     if (BRAM_SIZE == 18 && BRAM_MODE == "TRUE_DUAL_PORT") begin			 $display("Attribute Syntax Error : The attribute READ_WIDTH_A on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", READ_WIDTH_A);			 $finish;		     end		 end	    72 : begin		     if (BRAM_SIZE == 18) begin			 $display("Attribute Syntax Error : The attribute READ_WIDTH_A on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", READ_WIDTH_A);			 $finish;		     end		     else if ((BRAM_SIZE == 16 || BRAM_SIZE == 36) && BRAM_MODE == "TRUE_DUAL_PORT") begin			 $display("Attribute Syntax Error : The attribute READ_WIDTH_A on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9, 18 or 36.", READ_WIDTH_A);			 $finish;		     end	         end	    default : begin		          if (BRAM_SIZE == 18) begin			      $display("Attribute Syntax Error : The attribute READ_WIDTH_A on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", READ_WIDTH_A);			      $finish;			  end			  else if (BRAM_SIZE == 16 || BRAM_SIZE == 36) begin			      $display("Attribute Syntax Error : The attribute READ_WIDTH_A on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9, 18 or 36.", READ_WIDTH_A);			      $finish;			  end	               end	endcase // case(READ_WIDTH_A)    	case (READ_WIDTH_B)	    0, 1, 2, 4, 9, 18 : ;	    36 : begin 		     if (BRAM_SIZE == 18 && BRAM_MODE == "TRUE_DUAL_PORT") begin			 $display("Attribute Syntax Error : The attribute READ_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", READ_WIDTH_B);			 $finish;		     end		 end	    72 : begin		     if (BRAM_SIZE == 18) begin			 $display("Attribute Syntax Error : The attribute READ_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", READ_WIDTH_B);			 $finish;		     end		     else if ((BRAM_SIZE == 16 || BRAM_SIZE == 36) && BRAM_MODE == "TRUE_DUAL_PORT") begin			 $display("Attribute Syntax Error : The attribute READ_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9, 18 or 36.", READ_WIDTH_B);			 $finish;		     end	         end	    default : begin		          if (BRAM_SIZE == 18) begin			      $display("Attribute Syntax Error : The attribute READ_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9 or 18.", READ_WIDTH_B);			      $finish;			  end			  else if (BRAM_SIZE == 16 || BRAM_SIZE == 36) begin			      $display("Attribute Syntax Error : The attribute READ_WIDTH_B on ARAMB36_INTERNAL instance %m is set to %d.  Legal values for this attribute are 0, 1, 2, 4, 9, 18 or 36.", READ_WIDTH_B);			      $finish;			  end	               end	endcase // case(READ_WIDTH_B)		if ((RAM_EXTENSION_A == "LOWER" || RAM_EXTENSION_A == "UPPER") && READ_WIDTH_A != 1) begin	    $display("Attribute Syntax Error : If attribute RAM_EXTENSION_A on ARAMB36_INTERNAL instance %m is set to either LOWER or UPPER, then READ_WIDTH_A has to be set to 1.");	    $finish;	end		if ((RAM_EXTENSION_A == "LOWER" || RAM_EXTENSION_A == "UPPER") && WRITE_WIDTH_A != 1) begin	    $display("Attribute Syntax Error : If attribute RAM_EXTENSION_A on ARAMB36_INTERNAL instance %m is set to either LOWER or UPPER, then WRITE_WIDTH_A has to be set to 1.");	    $finish;	end	 if ((RAM_EXTENSION_B == "LOWER" || RAM_EXTENSION_B == "UPPER") && READ_WIDTH_B != 1) begin	    $display("Attribute Syntax Error : If attribute RAM_EXTENSION_B on ARAMB36_INTERNAL instance %m is set to either LOWER or UPPER, then READ_WIDTH_B has to be set to 1.");	    $finish;	end	if ((RAM_EXTENSION_B == "LOWER" || RAM_EXTENSION_B == "UPPER") && WRITE_WIDTH_B != 1) begin	    $display("Attribute Syntax Error : If attribute RAM_EXTENSION_B on ARAMB36_INTERNAL instance %m is set to either LOWER or UPPER, then WRITE_WIDTH_B has to be set to 1.");	    $finish;	end	if (READ_WIDTH_A == 0 && READ_WIDTH_B == 0) begin	    $display("Attribute Syntax Error : Attributes READ_WIDTH_A and READ_WIDTH_B on ARAMB36_INTERNAL instance %m, both can not be 0.");	    $finish;	end	       	case (WRITE_MODE_A)	    "WRITE_FIRST" : wr_mode_a <= 2'b00;	    "READ_FIRST"  : wr_mode_a <= 2'b01;	    "NO_CHANGE"   : wr_mode_a <= 2'b10;	    default       : begin				$display("Attribute Syntax Error : The Attribute WRITE_MODE_A on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are WRITE_FIRST, READ_FIRST or NO_CHANGE.", WRITE_MODE_A);				$finish;			    end	endcase	case (WRITE_MODE_B)	    "WRITE_FIRST" : wr_mode_b <= 2'b00;	    "READ_FIRST"  : wr_mode_b <= 2'b01;	    "NO_CHANGE"   : wr_mode_b <= 2'b10;	    default       : begin				$display("Attribute Syntax Error : The Attribute WRITE_MODE_B on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are WRITE_FIRST, READ_FIRST or NO_CHANGE.", WRITE_MODE_B);				$finish;			    end	endcase	case (RAM_EXTENSION_A)	    "UPPER" : cascade_a <= 2'b11;	    "LOWER" : cascade_a <= 2'b01;	    "NONE"  : cascade_a <= 2'b00;	    default : begin	       	          $display("Attribute Syntax Error : The attribute RAM_EXTENSION_A on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are LOWER, NONE or UPPER.", RAM_EXTENSION_A);		          $finish;		      end	endcase	case (RAM_EXTENSION_B)	    "UPPER" : cascade_b <= 2'b11;	    "LOWER" : cascade_b <= 2'b01;	    "NONE"  : cascade_b <= 2'b00;	    default : begin	       	          $display("Attribute Syntax Error : The attribute RAM_EXTENSION_B on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are LOWER, NONE or UPPER.", RAM_EXTENSION_B);		          $finish;		      end	endcase	if (!(EN_ECC_WRITE == "TRUE" || EN_ECC_WRITE == "FALSE")) begin	    $display("Attribute Syntax Error : The attribute EN_ECC_WRITE on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are TRUE or FALSE.", EN_ECC_WRITE);	    $finish;	end		if (!(EN_ECC_READ == "TRUE" || EN_ECC_READ == "FALSE")) begin	    $display("Attribute Syntax Error : The attribute EN_ECC_READ on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are TRUE or FALSE.", EN_ECC_READ);	    $finish;	end	if (EN_ECC_SCRUB == "TRUE") begin	    $display("DRC Error : The attribute EN_ECC_SCRUB = TRUE is not supported on ARAMB36_INTERNAL instance %m.");	    $finish;	end		if (!(EN_ECC_SCRUB == "TRUE" || EN_ECC_SCRUB == "FALSE")) begin	    $display("Attribute Syntax Error : The attribute EN_ECC_SCRUB on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are TRUE or FALSE.", EN_ECC_SCRUB);	    $finish;	end		if (EN_ECC_READ == "FALSE" && EN_ECC_SCRUB == "TRUE") begin	    $display("DRC Error : The attribute EN_ECC_SCRUB = TRUE is vaild only if the attribute EN_ECC_READ set to TRUE on ARAMB36_INTERNAL instance %m.");	    $finish;	end		if ((SIM_COLLISION_CHECK != "ALL") && (SIM_COLLISION_CHECK != "NONE") && (SIM_COLLISION_CHECK != "WARNING_ONLY") && (SIM_COLLISION_CHECK != "GENERATE_X_ONLY")) begin	    	    $display("Attribute Syntax Error : The attribute SIM_COLLISION_CHECK on ARAMB36_INTERNAL instance %m is set to %s.  Legal values for this attribute are ALL, NONE, WARNING_ONLY or GENERATE_X_ONLY.", SIM_COLLISION_CHECK);	    $finish;	end	    end // initial begin    always @(gsr_in)	if (gsr_in) begin	    	    assign doa_out_out = INIT_A[0 +: ra_width];	    assign doa_out = INIT_A[0 +: ra_width];			    if (ra_width >= 8) begin		assign dopa_out_out = INIT_A[ra_width +: ra_widthp];		assign dopa_out = INIT_A[ra_width +: ra_widthp];	    end	    assign dob_out_out = INIT_B[0 +: rb_width];	    assign dob_out = INIT_B[0 +: rb_width];			    if (rb_width >= 8) begin		assign dopb_out_out = INIT_B[rb_width +: rb_widthp];		assign dopb_out = INIT_B[rb_width +: rb_widthp];	    end	    assign dbiterr_out = 0;	    assign sbiterr_out = 0;	    	end	else begin	    deassign doa_out_out;	    deassign dopa_out_out;	    deassign dob_out_out;	    deassign dopb_out_out;	    deassign doa_out;	    deassign dopa_out;	    deassign dob_out;	    deassign dopb_out;	    deassign dbiterr_out;	    deassign sbiterr_out;	end    always @(posedge clka_in) begin	rising_clka = 1;		if (ena_in === 1'b1) begin	    prev_time = curr_time;	    curr_time = $time;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -