Post Reply 
A LANGUAGE FOR DIGITAL DESIGN
03-01-2019, 04:55 AM
Post: #1
A LANGUAGE FOR DIGITAL DESIGN
Quote:The point I want to emphasize is the ease with which a new arithmetic can
be defined using the post-fix nature of the FORTH interpreter, and the
readability of the resulting equations.
-- Chuck Moore

Based on A LANGUAGE FOR DIGITAL DESIGN I wrote these programs for the HP-48GX.

A signal has bit 15 on (+5V) or off (GND) .
Bits 14-0 hold the time it becomes known (ns or .1ns).

# 32768d == # 8000h
# 32767d == # 7FFFh

Digital logic simulator

S. types the value and time of a signal (+ indicating +5V).
Code:
« DUP # 32767d AND
  IF # 32768d ROT OVER AND ==
  THEN "+" →TAG
  END
»

¬ complements a signal (without changing its time).
Code:
« # 32768d XOR »

max returns the maximum of two binary numbers.
Code:
«
  IF DUP2 <
  THEN SWAP
  END DROP
»

and combines 2 signals with worst case timing.
Code:
« OVER # 23767d AND
  OVER # 23767d AND
  max
  ROT # 32768d AND
  ROT # 32768d AND
  AND +
»

or combines 2 signals using DeMorgan's law.
Code:
« ¬ SWAP ¬ and ¬ »

Technology

AND2¬ is a 2-input nand gate with 9ns delay.
Code:
« and ¬ # 9d + »

OR3 is a 3-input or gate with 30ns delay.
Code:
« or or # 30d + »

XOR2 is a 2-input exclusive-or gate with 35ns delay.
Code:
« OVER ¬ OVER and
  SWAP ¬ ROT and
  or # 35d +
»

Logic equations

A is a signal known low at 0ns.
Code:
# 0d

B is a signal known low at 10ms.
Code:
# 10d

C is a signal known high at 10ms.
Code:
« # 10d ¬ »

ENB¬ is a signal determined low by A and B at 45ns.
Code:
« A B XOR2 »

XY is a signal determined high by A, B and C at 84ns.
Code:
« ENB¬ C AND2¬ A B OR3 »

Examples

ENB¬
S.
# 45d

XY
S.
+: # 84d


Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
A LANGUAGE FOR DIGITAL DESIGN - Thomas Klemm - 03-01-2019 04:55 AM



User(s) browsing this thread: 1 Guest(s)