[logo] Circuit Fellow Programming Reference

Package Information

[Name]

circ

[Overview]

Provides I/O functions for circuit simulators.

>>Bit Description

n-bits handled by Circuit Fellow needs to take one of the following forms1.

1bit form
  • 1bit ... 1 or 0
n-bit form
  • 1bit ... b1(B0)     where B0 is 1 or 0
  • 4bit ... b4(B3, B2, B1, B0)     where Bx is 1 or 0
  • 8bit ... b8(B7, B6, B5, B4, B3, B2, B1, B0)     where Bx is 1 or 0

>>Predicates

Primitives

input(X)   <Input>

Reads n-bits from either simulated I/O window or real I/O, and unifies them with X.

Specify X in n-bit form above. This primitive reads the specified n-bit value.

[Where]

Guard

output(X)   <Output>

Writes n-bits X to either simulated I/O window or real I/O.

This primitive waits until X is instantiated and contains no variables.

[Where]

Guard

test(Name, X)   <Output to Tester Window>

Writes n-bits X to the tester window named Name.

This primitive waits until X is instantiated and contains no variables.

[Where]

Guard

Processes

outputstream(Xs)   <Bit-Stream Output>

Writes the elements of n-bit stream Xs from its top to either simulated I/O window or real I/O.

[Where]

Body

teststream(Name, Xs)   <Bit-Stream Test>

Writes the elements of n-bit stream Xs from its top to the tester window named Name.

[Where]

Body


1

In many cases, an arbitrary number of bits can be handled in the similar form.