Skip to content

Commit

Permalink
refactor: move number conversion modules
Browse files Browse the repository at this point in the history
  • Loading branch information
glencoe committed Sep 27, 2023
1 parent f8c674f commit ed3086c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion elasticai/creator/nn/fixed_point/mac/_hw_test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pytest
import torch
from fixed_point.number_converter import FXPParams

from elasticai.creator.file_generation.on_disk_path import OnDiskPath
from elasticai.creator.vhdl.ghdl_simulation import GHDLSimulation

from .layer import MacLayer
from .number_converter import FXPParams

integer_test_data = [
(FXPParams(4, 0), x1, x2)
Expand Down
3 changes: 2 additions & 1 deletion elasticai/creator/nn/fixed_point/mac/layer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from fixed_point.number_converter import FXPParams

from elasticai.creator.file_generation.savable import Savable

from .._math_operations import MathOperations
from .._two_complement_fixed_point_config import FixedPointConfig
from .design import MacDesign
from .mactestbench import MacTestBench
from .number_converter import FXPParams


class MacLayer:
Expand Down
4 changes: 2 additions & 2 deletions elasticai/creator/nn/fixed_point/mac/mactestbench.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from fixed_point.number_converter import NumberConverter

from elasticai.creator.file_generation.savable import Path
from elasticai.creator.file_generation.template import InProjectTemplate

from .number_converter import NumberConverter


class MacTestBench:
def __init__(self, uut, fxp_params, name, uut_name):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dataclasses

from fixed_point.mac._number_conversion import (
from fixed_point._number_conversion import (
bits_to_integer,
bits_to_rational,
convert_rational_to_bit_pattern,
Expand Down

0 comments on commit ed3086c

Please sign in to comment.