ieee754fpu.git
5 years agoreset_less on signals that do not need it
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 15:27:12 +0000 (15:27 +0000)]
reset_less on signals that do not need it

5 years agoreorganise unit test single to do much more comprehensive test cases.
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 12:51:50 +0000 (12:51 +0000)]
reorganise unit test single to do much more comprehensive test cases.

specific edge cases on the exponent are covered, with random mantissas:
-126, -127, 127, 128

5 years agotake out FP16 non-canonical NaN weirdness for now
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 11:23:22 +0000 (11:23 +0000)]
take out FP16 non-canonical NaN weirdness for now

5 years agoadd corner-cases +/-0 + NaN
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 09:20:13 +0000 (09:20 +0000)]
add corner-cases +/-0 + NaN

5 years agoadd FP16 add unit test
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 08:24:20 +0000 (08:24 +0000)]
add FP16 add unit test

5 years agoINF + -INF bug
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 08:23:20 +0000 (08:23 +0000)]
INF + -INF bug

5 years agowhoops FP16 mantissa off-by-one
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 08:05:29 +0000 (08:05 +0000)]
whoops FP16 mantissa off-by-one

5 years agoremove hard-coded width
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 07:41:35 +0000 (07:41 +0000)]
remove hard-coded width

5 years agoadd FP16 format
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 07:41:23 +0000 (07:41 +0000)]
add FP16 format

5 years agoadd shift up multi function
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 06:41:50 +0000 (06:41 +0000)]
add shift up multi function

5 years agoadd extra regression tests (a + -a) for add
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 05:41:28 +0000 (05:41 +0000)]
add extra regression tests (a + -a) for add

5 years agocomment for a + -a special case add
Luke Kenneth Casson Leighton [Tue, 19 Feb 2019 05:39:14 +0000 (05:39 +0000)]
comment for a + -a special case add

5 years agoadd 64 bit mul unit test
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:32:38 +0000 (21:32 +0000)]
add 64 bit mul unit test

5 years agowhoops, off-by-one in use of mw, in multiply_1 stage
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:32:20 +0000 (21:32 +0000)]
whoops, off-by-one in use of mw, in multiply_1 stage

5 years agowhoops, messing up on m_width *sigh*
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:26:52 +0000 (21:26 +0000)]
whoops, messing up on m_width *sigh*

5 years agouse double run_corner_cases function in add unit test
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:23:52 +0000 (21:23 +0000)]
use double run_corner_cases function in add unit test

5 years agoadd corner case unit test function
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:22:57 +0000 (21:22 +0000)]
add corner case unit test function

5 years agodoh! use z mantissa width to specify product width.
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:21:52 +0000 (21:21 +0000)]
doh! use z mantissa width to specify product width.
also take out hard-coded numbers, ready for 64 bit

5 years agouse common run_corner_cases function
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:16:08 +0000 (21:16 +0000)]
use common run_corner_cases function

5 years agouse common run_corner_cases function
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:15:03 +0000 (21:15 +0000)]
use common run_corner_cases function

5 years agoadd mul unit test
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:13:31 +0000 (21:13 +0000)]
add mul unit test

5 years agospecial cases, sign of zero and inf matters: a.s ^ b.s
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:13:04 +0000 (21:13 +0000)]
special cases, sign of zero and inf matters: a.s ^ b.s

5 years agomissed indentation of if statements in special cases
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:12:16 +0000 (21:12 +0000)]
missed indentation of if statements in special cases

5 years agoof.guard, of.round, of.sticky - of is a class with members "guard, round etc"
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:11:47 +0000 (21:11 +0000)]
of.guard, of.round, of.sticky - of is a class with members "guard, round etc"

5 years agom.next not m.next +=
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:10:28 +0000 (21:10 +0000)]
m.next not m.next +=

5 years agowhoops, self.width not self.m_width
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:10:07 +0000 (21:10 +0000)]
whoops, self.width not self.m_width

5 years agoadd corner case unit test function
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 21:04:29 +0000 (21:04 +0000)]
add corner case unit test function

5 years agodiff on div and mul shows corrections stage missed out
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:22:50 +0000 (18:22 +0000)]
diff on div and mul shows corrections stage missed out

5 years agouse get_op functions, easier to do
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:20:51 +0000 (18:20 +0000)]
use get_op functions, easier to do

5 years agoproduct in multiply, not tot (was from add)
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:18:48 +0000 (18:18 +0000)]
product in multiply, not tot (was from add)

5 years agocorrections in whitespace due to use of tabs
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:12:24 +0000 (18:12 +0000)]
corrections in whitespace due to use of tabs

5 years agomul needs FPNum mantissa to be 24-bit on a and b, set 2nd arg False
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:08:14 +0000 (18:08 +0000)]
mul needs FPNum mantissa to be 24-bit on a and b, set 2nd arg False

5 years agoadd requirements (dependencies)
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:06:51 +0000 (18:06 +0000)]
add requirements (dependencies)

5 years agoquite a lot of corrections to div special cases
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 18:05:38 +0000 (18:05 +0000)]
quite a lot of corrections to div special cases

5 years agoadd regression test on div
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:43:13 +0000 (17:43 +0000)]
add regression test on div

5 years agoremove zeroing bugfix correction, not needed any more
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:42:59 +0000 (17:42 +0000)]
remove zeroing bugfix correction, not needed any more

5 years agosplit out edge cases from unit tests into common files
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:37:52 +0000 (17:37 +0000)]
split out edge cases from unit tests into common files

5 years agoadd operator argument to unit tests
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:30:25 +0000 (17:30 +0000)]
add operator argument to unit tests

5 years agoadd div unit tests
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:22:07 +0000 (17:22 +0000)]
add div unit tests

5 years agosplit out common double-precision unit test code
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:17:19 +0000 (17:17 +0000)]
split out common double-precision unit test code

5 years agosplit out common double-precision unit test code
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:16:21 +0000 (17:16 +0000)]
split out common double-precision unit test code

5 years agosplit out common unit test code
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:15:33 +0000 (17:15 +0000)]
split out common unit test code

5 years agosplit out unit test common code
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:13:07 +0000 (17:13 +0000)]
split out unit test common code

5 years agowhoops wrong gitignore path
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 17:12:44 +0000 (17:12 +0000)]
whoops wrong gitignore path

5 years agoadd jon dawson add64 unit tests
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 14:45:48 +0000 (14:45 +0000)]
add jon dawson add64 unit tests

5 years agoadd comment for random number tests
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 12:20:29 +0000 (12:20 +0000)]
add comment for random number tests

5 years agotest case fail, 2 numbers exceeded -INF but +ve INF was returned
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 12:08:55 +0000 (12:08 +0000)]
test case fail, 2 numbers exceeded -INF but +ve INF was returned

5 years agowhoops set mantissa = -127 instead of exponent... oops...
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 12:05:26 +0000 (12:05 +0000)]
whoops set mantissa = -127 instead of exponent... oops...

5 years agofix unit test use of xrange, replace with range
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 11:56:18 +0000 (11:56 +0000)]
fix unit test use of xrange, replace with range

5 years agofix a - b = zero by adding special case
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 11:55:33 +0000 (11:55 +0000)]
fix a - b = zero by adding special case

5 years agoadd unit tests
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 11:27:03 +0000 (11:27 +0000)]
add unit tests

5 years agouse straight << and >> operator instead of multi-level Mux
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 07:00:56 +0000 (07:00 +0000)]
use straight << and >> operator instead of multi-level Mux

5 years agoadd .gitignore
Luke Kenneth Casson Leighton [Mon, 18 Feb 2019 05:24:49 +0000 (05:24 +0000)]
add .gitignore

5 years agoFinished the module states and added __main__
Aleksandar Kostovic [Sun, 17 Feb 2019 18:05:41 +0000 (19:05 +0100)]
Finished the module states and added __main__

5 years agoAdd more special cases to the module
Aleksandar Kostovic [Sun, 17 Feb 2019 17:43:24 +0000 (18:43 +0100)]
Add more special cases to the module

5 years agoAdded comment to explain a case
Aleksandar Kostovic [Sun, 17 Feb 2019 15:40:24 +0000 (16:40 +0100)]
Added comment to explain a case

5 years agoTranslated more of the special cases to nmigen
Aleksandar Kostovic [Sun, 17 Feb 2019 15:36:51 +0000 (16:36 +0100)]
Translated more of the special cases to nmigen

5 years agoTranslated some of the special cases to nmigen
Aleksandar Kostovic [Sun, 17 Feb 2019 15:27:52 +0000 (16:27 +0100)]
Translated some of the special cases to nmigen

5 years agoStarted to build module using functions instead plain translation from verilog to...
Aleksandar Kostovic [Sun, 17 Feb 2019 15:11:08 +0000 (16:11 +0100)]
Started to build module using functions instead plain translation from verilog to nmigen

5 years agoStarted to translate special cases
Aleksandar Kostovic [Sun, 17 Feb 2019 15:00:29 +0000 (16:00 +0100)]
Started to translate special cases

5 years agoDone unpack in nmigen
Aleksandar Kostovic [Sun, 17 Feb 2019 14:42:22 +0000 (15:42 +0100)]
Done unpack in nmigen

5 years agoadd unit tests that push the mantissa to zero or close to zero
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 14:08:58 +0000 (14:08 +0000)]
add unit tests that push the mantissa to zero or close to zero

5 years agoadd TODO comment
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 14:07:33 +0000 (14:07 +0000)]
add TODO comment

5 years agotest single-cycle align phase on 64-bit add
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 14:03:29 +0000 (14:03 +0000)]
test single-cycle align phase on 64-bit add

5 years agoadd single-cycle version of alignment process in fadd
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 13:09:55 +0000 (13:09 +0000)]
add single-cycle version of alignment process in fadd

5 years agoadd a variable-length single-cycle shift_down of mantissa, and unit test
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 13:07:06 +0000 (13:07 +0000)]
add a variable-length single-cycle shift_down of mantissa, and unit test

5 years agoadd a MultiShift class for generating single-cycle bit-shifters
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 10:03:51 +0000 (10:03 +0000)]
add a MultiShift class for generating single-cycle bit-shifters

5 years agoadd extra comments
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 08:22:03 +0000 (08:22 +0000)]
add extra comments

5 years agoadd double-width divide as well, and preliminary unit test
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 07:42:23 +0000 (07:42 +0000)]
add double-width divide as well, and preliminary unit test

5 years agoadd beginning unit tests for 64-bit add
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 07:16:22 +0000 (07:16 +0000)]
add beginning unit tests for 64-bit add

5 years agoconvert to more general base classes, start support for FP64
Luke Kenneth Casson Leighton [Sun, 17 Feb 2019 06:42:21 +0000 (06:42 +0000)]
convert to more general base classes, start support for FP64

5 years agoadd extra random div unit test cases
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 17:19:28 +0000 (17:19 +0000)]
add extra random div unit test cases

5 years agoadd another random div test
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 12:29:24 +0000 (12:29 +0000)]
add another random div test

5 years agocomment divisor stages
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 12:25:36 +0000 (12:25 +0000)]
comment divisor stages

5 years agorename (shorten) divisor variable names (and comment them)
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 12:22:12 +0000 (12:22 +0000)]
rename (shorten) divisor variable names (and comment them)

5 years agoadd extra arbitrary div unit test
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 12:14:21 +0000 (12:14 +0000)]
add extra arbitrary div unit test

5 years agocorrect comments
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 12:13:06 +0000 (12:13 +0000)]
correct comments

5 years agofirst initial success with div algorithm
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 12:10:49 +0000 (12:10 +0000)]
first initial success with div algorithm

5 years agoFixed typo in get_b state
Aleksandar Kostovic [Sat, 16 Feb 2019 11:34:59 +0000 (12:34 +0100)]
Fixed typo in get_b state

5 years agoDid get_b state in nmigen
Aleksandar Kostovic [Sat, 16 Feb 2019 11:34:17 +0000 (12:34 +0100)]
Did get_b state in nmigen

5 years agoDid get_a state in nmigen
Aleksandar Kostovic [Sat, 16 Feb 2019 11:27:29 +0000 (12:27 +0100)]
Did get_a state in nmigen

5 years agoremove some test cases from div
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 11:25:15 +0000 (11:25 +0000)]
remove some test cases from div

5 years agoadd div experiment
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 11:24:12 +0000 (11:24 +0000)]
add div experiment

5 years agoMade a file and started to do porting from verilog to nmigen
Aleksandar Kostovic [Sat, 16 Feb 2019 11:11:41 +0000 (12:11 +0100)]
Made a file and started to do porting from verilog to nmigen

5 years agoop_normalise does not need overflow class arg
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 11:03:28 +0000 (11:03 +0000)]
op_normalise does not need overflow class arg

5 years agosplit out base classes into separate fpbase module
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 10:51:06 +0000 (10:51 +0000)]
split out base classes into separate fpbase module

5 years agoadd op_normalise function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 10:48:47 +0000 (10:48 +0000)]
add op_normalise function

5 years agopad with zeros if needed in decode
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 10:45:41 +0000 (10:45 +0000)]
pad with zeros if needed in decode

5 years agoseparate common functions into FPBase class
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:47:55 +0000 (09:47 +0000)]
separate common functions into FPBase class

5 years agomove denormalisation to function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:45:25 +0000 (09:45 +0000)]
move denormalisation to function

5 years agoadd comment on special operations
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:41:49 +0000 (09:41 +0000)]
add comment on special operations

5 years agowhitespace cleanup and more comments
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:39:49 +0000 (09:39 +0000)]
whitespace cleanup and more comments

5 years agoget rid of unpack phase by making it part of the get_op
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:32:26 +0000 (09:32 +0000)]
get rid of unpack phase by making it part of the get_op

5 years agocomment functions
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:27:54 +0000 (09:27 +0000)]
comment functions

5 years agorename round function to roundz (round is a keyword)
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:15:47 +0000 (09:15 +0000)]
rename round function to roundz (round is a keyword)

5 years agocreate put_z function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:14:26 +0000 (09:14 +0000)]
create put_z function

5 years agocreate pack function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:12:22 +0000 (09:12 +0000)]
create pack function

5 years agocreate pack function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:12:14 +0000 (09:12 +0000)]
create pack function

5 years agomove round to function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:07:13 +0000 (09:07 +0000)]
move round to function

5 years agomove normalise_2 to function
Luke Kenneth Casson Leighton [Sat, 16 Feb 2019 09:05:53 +0000 (09:05 +0000)]
move normalise_2 to function