test

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2021 License: ISC Imports: 0 Imported by: 0

README

Tests for floating-point arithmetic

This directory contains test infrastructure for the floating-point arithmetic operations of the RISC emulator.

The tests are run by transpiling the original Verilog sources to Go code and then comparing the emulator implementation against the Verilog implementation.

Set the VERILOG environment variable to the directory with the Verilog sources. You can download the Verilog sources from: http://people.inf.ethz.ch/wirth/ProjectOberon/index.html

The following files are required:

Divider.v  FPAdder.v  FPDivider.v  FPMultiplier.v

Use go generate to transpile the Verilog sources to Go:

$ go generate

The tests are implemented as main programs in the following sub-directories:

add  div  flr  flt  idiv  mul

Run the tests:

$ go run add/*.go
$ go run div/*.go
$ go run flr/*.go
$ go run flt/*.go
$ go run idiv/*.go
$ go run mul/*.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Command numbers generates a Go file containing a slice of uint32 numbers as test input for the Oberon RISC emulator's floating-point arithmetic operations.
Command numbers generates a Go file containing a slice of uint32 numbers as test input for the Oberon RISC emulator's floating-point arithmetic operations.
Command v2go translates Verilog source code to Go.
Command v2go translates Verilog source code to Go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL