Search   
Home  Print View  

 

Specs

Branch Content

RAM-DISK device

RAM-DISK is a peripheral that presents a generous amount of Random Access Memory as it it were a mechanical disk. It is intended to overcome the limitation of 4KWords of main memory imposed by the HER/12 architecture.

RAM-DISK devices can be used for temporary storage. For example, they can be employed to implement sorting algorithms such as Merge Sort, swap devices, support for Overlaid software, and others.

Being a peripheral, a RAM-DISK device connects to the CPU via I/O channel and it is treated by the CPU as a block device. Being much faster than a real disk, transfer from/to RAM-DISK is not synchronized via interrupts but (if necessary) via WAIT signal.

Block access

The memory contained in a RAM-DISK is broken into blocks of 256 words. The CPU addresses the RAM-DISK in terms of blocks rather than words, so, with 12 bits address, the CPU can access up to (2^12 * 256) = 1 Mwords.

Before reading or writing to RAM-DISK, the CPU may do a write operation on the CONTROL register to specify the starting block. Once the block is defined, consecutive read or write operations on the DATA register will access consecutive words from that address up, meaning that blocks count is auto-incremented with each read or write cycle. Count will roll-over from FFFFF to 0.

Partitions

The 1 Mword capacity limit for a RAM-DISK device can be extended through the concept of "partition".

A partition is a memory bank of 1 Mwords. Up to 256 partitions can be defined for a total of 256 Mwords of disk space.

Partitions are separate from each others in the sense that consecutive reading or writing operations will roll-over at partitions boundaries.

Internal Registers

The RAM-DISK device must have the following internal registers:

    DATA     (12 bits) Represents the data path to the content.
    CONTROL  (12 bits) Report status, accepts commands and hold current partition number.
    BC       (12 bits) Block Count: Holds the current block being accesses.
    WC       (8 bits ) Word Count: Counts words within current block.

The effective address within the partition is given by BC (most significant 12 bits) and WC (least significant 8 bits). The partition number adds 8 more significant bits for a total address of 28 bits.
        
When reading or writing continuously on register DATA, register WC is auto-incremented with each read or write operation. Register BC is auto-incremented when WC rolls-over. When count is set on register BC, register WC is automatically reset to zero.

The partition number is never auto-incremented or altered in any way other than over-writing it in the CONTROL register with a write operation.

CONTROL register format

The CPU queries and commands the RAM-DISK device by reading or writing the CONTROL register, which format is as following:

    bit     Meaning
    ----------------------------------
    11      Alarm
    10      Write Protect
    9       Access BC register
    8       Proprietary
    0-7     Partition number
    ----------------------------------

Bits 0-7 hold the current partition number. After writing this byte, every I/O operation on the DATA register will apply to that partition only.

Bit 8 is for proprietary implementation. The RAM-DISK device designer can make free use of it.

Bit 9, when set, makes the next reading or write operation made on the CONTROL register to be effective on the BC register instead. This a the way of getting or setting the current block number.

Bit 10, when set, makes the memory content read-only. Any attempt to write on the DATA register will result in an Alarm shown in the device's panel.

Bit 11 is read-only. It reads 1 if the device is in Alarm condition. It is opt to the software to pay attention or not to this bit.

Powered by HelpBooks version 0.86, running at: melissa