RAM

NAME_TABLE:

C_Function_Name: cm_d_ram

Spice_Model_Name: d_ram

Description: "digital random-access memory"

PORT_TABLE:

Port Name: data_in data_out

Description: "data input line(s)" "data output line(s)"

Direction: in out

Default_Type: d d

Allowed_Types: [d] [d]

Vector: yes yes

Vector_Bounds: [1 -] data_in

Null_Allowed: no no

PORT_TABLE:

Port Name: address write_en

Description: "address input line(s)" "write enable line"

Direction: in in

Default_Type: d d

Allowed_Types: [d] [d]

Vector: yes no

Vector_Bounds: [1 -] -

Null_Allowed: no no

PORT_TABLE:

Port Name: select

Description: "chip select line(s)"

Direction: in

Default_Type: d

Allowed_Types: [d]

Vector: yes

Vector_Bounds: [1 16]

Null_Allowed: no

PARAMETER_TABLE:

Parameter_Name: select_value

Description: "decimal active value for select line comparison"

Data_Type: int

Default_Value: 1

Limits: [0 32767]

Vector: no

Vector_Bounds: -

Null_Allowed: yes

PARAMETER_TABLE:

Parameter_Name: ic

Description: "initial bit state @ dc"

Data_Type: int

Default_Value: 2

Limits: [0 2]

Vector: no

Vector_Bounds: -

Null_Allowed: yes

PARAMETER_TABLE:

Parameter_Name: read_delay

Description: "read delay from address/select/write.en active"

Data_Type: real

Default_Value: 100.0e-9

Limits: [1.0e-12 -]

Vector: no

Vector_Bounds: -

Null_Allowed: yes

PARAMETER_TABLE:

Parameter_Name: data_load address_load

Description: "data_in load value (F)" "addr. load value (F)"

Data_Type: real real

Default_Value: 1.0e-12 1.0e-12

Limits: - -

Vector: no no

Vector_Bounds: - -

Null_Allowed: yes yes

PARAMETER_TABLE:

Parameter_Name: select_load

Description: "select load value (F)"

Data_Type: real

Default_Value: 1.0e-12

Limits: -

Vector: no

Vector_Bounds: -

Null_Allowed: yes

PARAMETER_TABLE:

Parameter_Name: enable_load

Description: "enable line load value (F)"

Data_Type: real

Default_Value: 1.0e-12

Limits: -

Vector: no

Vector_Bounds: -

Null_Allowed: yes

  • Description:
    The digital RAM is an M-wide, N-deep random access memory element with programmable select lines, tristated data out lines, and a single write/~read line. The width of the RAM words (M) is set through the use of the word width parameter. The depth of the RAM (N) is set by the number of address lines input to the device. The value of N is related to the number of address input lines (P) by the following equation: [2^{P} = N]There is no reset line into the device. However, an initial value for all bits may be specified by setting the ic parameter to either 0 or 1. In reading a word from the ram, the read delay value is invoked, and output will not appear until that delay has been satisfied. Separate rise and fall delays are not supported for this device.
    Note that UNKNOWN inputs on the address lines are not allowed during a write. In the event that an address line does indeed go unknown during a write, the entire contents of the ram will be set to unknown. This is in contrast to the data in lines being set to unknown during a write; in that case, only the selected word will be corrupted, and this is corrected once the data lines settle back to a known value. Note that protection is added to the write en line such that extended UNKNOWN values on that line are interpreted as ZERO values. This is the equivalent of a read operation and will not corrupt the contents of the RAM. A similar mechanism exists for the select lines. If they are unknown, then it is assumed that the chip is not selected.
    Detailed timing-checking routines are not provided in this model, other than for the enable delay and select delay restrictions on read operations. You are advised, therefore, to carefully check the timing into and out of the RAM for correct read and write cycle times, setup and hold times, etc. for the particular device they are attempting to model.

Example SPICE Usage:

a4 [3 4 5 6] [3 4 5 6] [12 13 14 15 16 17 18 19] 30 [22 23 24] ram2

.model ram2 d_ram(select_value = 2 ic = 2 read_delay = 80e-9)