From 789c95b1c1ec974a9e9f3b2b6b87a8df84d0b018 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 9 Mar 2005 04:52:40 +0000 Subject: [PATCH] reimplement memory ports. --- vvp/README.txt | 42 +++--- vvp/compile.cc | 37 ++--- vvp/compile.h | 7 +- vvp/memory.cc | 373 ++++++------------------------------------------- vvp/memory.h | 52 ++++++- vvp/parse.y | 9 +- 6 files changed, 133 insertions(+), 387 deletions(-) diff --git a/vvp/README.txt b/vvp/README.txt index ceaf74160..3587c0124 100644 --- a/vvp/README.txt +++ b/vvp/README.txt @@ -1,7 +1,7 @@ /* * Copyright (c) 2001 Stephen Williams (steve@icarus.com) * - * $Id: README.txt,v 1.58 2005/03/03 04:33:10 steve Exp $ + * $Id: README.txt,v 1.59 2005/03/09 04:52:40 steve Exp $ */ VVP SIMULATION ENGINE @@ -306,42 +306,36 @@ allowed for multidimensional indexing. This statement creates the memory array and makes it available to procedural code. Procedural access to the memory references the memory as single array -of words. +of words, with the base address==0, and the last address the size (in +words) of the memory -1. It is up to the compiler to convert Verilog +index sets to a cannonical address. The multi-dimensional index set is +available for VPI use. Structural read access is implemented in terms of address and data ports. The addresses applied to the address port are expected to be -within the ranges specified, not based at zero. +in cannonical form. -A read port is a vector of functors that is wide enough to accept all -provided address bits and at least as wide as the requested subset of -the data port. +A read port is a functor that takes a single input, the read address, +and outputs the word value at the given (cannonical) address. -