Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use VCS to watch the internal memory in my design?

Status
Not open for further replies.

cnspy

Full Member level 3
Full Member level 3
Joined
Sep 10, 2002
Messages
150
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,298
Activity points
1,041
vcdplusmemon

I have defined two memory in my design:

reg [15:0] dmem [31:0];
reg [15:0] imem[31:0];

I hope to watch the value in these memory when using VCS debugging.

But I can not find these memory from the item list.
 

memory dumping in vcs

when you dump, add the "aggregate" option
 

$vcdplusmemon

Checkout this!
-------------------------------------------------------------
vcs -PP +memcbk Testbench.v -R
vcs -RPP +vpdfile+vcdplus.vpd
-------------------------------------------------------------
Code:
`timescale 1ns/100ps

module Testbench;

  integer i;
  reg       R1[7:0];
  reg [3:0] R2[7:0];

  initial  begin
	for (i=0; i<8; i=i+1) begin
	  R1[i] = 1'b0;
	  R2[i] = 4'h0;
	end

	#10;

	for (i=0; i<8; i=i+1) begin
	  R1[i] = 1'b1;
	  R2[i] = 4'hf;
	end
  end


  initial begin
	$vcdpluson();
	$vcdplusmemon();
  end
endmodule
 

vcs dump memory contents

what version of vcs u r using?
vcs comes in 2 gui, virsim and dve.

if you are using dve, there wont b any problem. follow the steps below:
1. vcs -debug <your filename>
2. simv -gui
it will bring up dve. at first glance you cannt c your mem
use ur mouse right click on the signal in hierarchy panel (the left most one), choose "add dump", in the dialog, check Aggregate.

you have to re-simulate your design under dve - Simulator -> Rebuid & start, then you will c ur memory instance now!

BTW, anyone know how to display using Virsim? I only know how to do it in dve.
 

memcbk

I jst figure it out lately.
if you want to display the memory content using virsim, here is what u can do:


in the interactive window, key in the following command in the command text box:
$vcdplusmemon

and that's it! you can c the mem in the signal panel, inside the hierarchy browser
 

vcs memcbk

use latest verdi from Novas company, they can infer the memory content based on read/write history. very cute.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top