Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
/ intsam Public archive

A sequential access memory with int cells

Notifications You must be signed in to change notification settings

intsuc/intsam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intsam

A sequential access memory with int cells.

Features

  • Sequential
  • Int cells
  • Int array pages
  • Caches
  • Cache hierarchy
  • Growable
  • Shrinkable

Example

# Increase the capacity to `4` pages (4 * 256 cells).
data modify storage intsam.__temp__:api/grow __input__ set value {capacity: 4}
function intsam:api/grow

# Store data `1` at address `2`.
data modify storage intsam.__temp__:api/store __input__ set value {data: 1, addr: 2}
function intsam:api/store

# Load data at address `2`.
data modify storage intsam.__temp__:api/load __input__ set value {addr: 2}
function intsam:api/load
execute if data storage intsam.__temp__:api/load __output__{data: 1}

# Consecutive access to the same page is fast.
data modify storage intsam.__temp__:api/load __input__ set value {addr: 255}
function intsam:api/load

# Access to other pages becomes slower as the distance increases.
data modify storage intsam.__temp__:api/load __input__ set value {addr: 256}
function intsam:api/load
data modify storage intsam.__temp__:api/load __input__ set value {addr: 768}
function intsam:api/load
data modify storage intsam.__temp__:api/load __input__ set value {addr: 0}
function intsam:api/load

# There is effectively no upper bound on the address space.
data modify storage intsam.__temp__:api/grow __input__ set value {capacity: 65536}
function intsam:api/grow
data modify storage intsam.__temp__:api/load __input__ set value {addr: 16777215}
function intsam:api/load

About

A sequential access memory with int cells

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published