OSHPARK
  • About Us
  • Services
  • Support
  • Sharing
  • Log in
  • Sign up
  • OSHPARK
  • About Us
  • Services
  • Support
  • Sharing
  • Log in

RC2014 LUT (Multiply) Module

author: feilipu
Top
Bottom

4 layer board of 3.91 x 1.98 inches (99.4 x 50.2 mm)
Uploaded: February 15, 2020
Shared: February 15, 2020
Total Price: $77.30

The RC2014 Z80 needed to have a fast multiply, and this is it.

design discussion on RC2014 forum

This 128kByte look-up table (LUT) Module allows the RC2014 to directly look up a 16-bit result at a 16-bit address.

The first application for the LUT Module is for an 16-bit result from a 8-bit x 8-bit multiply. It takes 61 clock cycles to return the result, and this is approximately 5 times faster than a shift-add multiply and 2.5 times faster than the best table multiply software routine.

The LUT Module can also hold other tables, including SINE or LOG / LN to 16-bit accuracy, CRC results, or other pre-calculable tables that need to be read quickly.

To multiply Register H by Register L, and return the result in HL, preserving all registers except BC.

mul_hl:
    ld b,h ; 4 multiplier to B
    ld c,0x40 ; 7 operand latch address
    out (c),l ; 12 multiplier from B, multiplicand from L
    in l,(c) ; 12 result LSB to L
    inc c ; 4 result MSB address
    in h,(c) ; 12 result MSB to H
    ret ; 10

The RC2014 Z80 needed to have a fast multiply, and this is it.

design discussion on RC2014 forum

This 128kByte look-up table (LUT) Module allows the RC2014 to directly look up a 16-bit result at a 16-bit address.

The first application for the LUT Module is for an 16-bit result from a 8-bit x 8-bit multiply. It takes 61 clock cycles to return the result, and this is approximately 5 times faster than a shift-add multiply and 2.5 times faster than the best table multiply software routine.

The LUT Module can also hold other tables, including SINE or LOG / LN to 16-bit accuracy, CRC results, or other pre-calculable tables that need to be read quickly.

To multiply Register H by Register L, and return the result in HL, preserving all registers except BC.

mul_hl:
    ld b,h ; 4 multiplier to B
    ld c,0x40 ; 7 operand latch address
    out (c),l ; 12 multiplier from B, multiplicand from L
    in l,(c) ; 12 result LSB to L
    inc c ; 4 result MSB address
    in h,(c) ; 12 result MSB to H
    ret ; 10
Top
Bottom
  • Actions

      Ordering shared project

      Hey there! Before ordering, make sure you have all the info you need to complete and use this design. This usually means a component list, and sometimes additional information such as assembly notes, source code, or usage guides.
      Since this is a project designed by a community member, it may contain design errors that prevent it from working as intended. OSH Park cannot place any guarantees about the functionality or correctness of the design.
      Order Board
    • Order Board
    • Download
    • Permalink
    • Embed link
Embeddable link to order this shared Project
  • COMPANY
  • About Us
  • Blog
  • Shop
  • SERVICES
  • Upload Your File
  • Prototypes
  • HELP
  • Support
  • If you can't find what you're looking for, please contact us at [email protected]
  • CONNECT
  • Shared Projects
  • Log in / Sign up
Whaleshark white
Follow us
© Copyright 2025 OSH Park, LLC | Privacy