amaranth.hdl: start all private names with an underscore.
This change completes commit 9dc0617e and makes all the tests pass. It corresponds with the ongoing langauge reference documentation effort. Fixes #781.
This commit is contained in:
parent
cf83193bf9
commit
5dd1223cf8
34 changed files with 167 additions and 162 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import warnings
|
||||
from enum import Enum, EnumMeta
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.lib.enum import Enum as AmaranthEnum
|
||||
|
||||
from .utils import *
|
||||
|
|
@ -1024,10 +1024,10 @@ class ArrayTestCase(FHDLTestCase):
|
|||
@ValueCastable.lowermethod
|
||||
def as_value(self):
|
||||
return Signal()
|
||||
|
||||
|
||||
def shape():
|
||||
return unsigned(1)
|
||||
|
||||
|
||||
a = Array([1,2,3])
|
||||
a[MyValue()]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from amaranth.hdl.cd import *
|
||||
from amaranth.hdl._cd import *
|
||||
|
||||
from .utils import *
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
import sys
|
||||
from collections import OrderedDict
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl.cd import *
|
||||
from amaranth.hdl.dsl import *
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.hdl._cd import *
|
||||
from amaranth.hdl._dsl import *
|
||||
from amaranth.lib.enum import Enum
|
||||
|
||||
from .utils import *
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
from collections import OrderedDict
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl.cd import *
|
||||
from amaranth.hdl.ir import *
|
||||
from amaranth.hdl.mem import *
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.hdl._cd import *
|
||||
from amaranth.hdl._ir import *
|
||||
from amaranth.hdl._mem import *
|
||||
|
||||
from .utils import *
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# amaranth: UnusedElaboratable=no
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl.mem import *
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.hdl._mem import *
|
||||
|
||||
from .utils import *
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import warnings
|
|||
|
||||
from enum import Enum
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl._ast import *
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
|
||||
from amaranth.hdl.rec import *
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
import warnings
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl.cd import *
|
||||
from amaranth.hdl.dsl import *
|
||||
from amaranth.hdl.ir import *
|
||||
from amaranth.hdl.xfrm import *
|
||||
from amaranth.hdl.mem import *
|
||||
from amaranth.hdl.mem import MemoryInstance
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.hdl._cd import *
|
||||
from amaranth.hdl._dsl import *
|
||||
from amaranth.hdl._ir import *
|
||||
from amaranth.hdl._xfrm import *
|
||||
from amaranth.hdl._mem import *
|
||||
from amaranth.hdl._mem import MemoryInstance
|
||||
|
||||
from .utils import *
|
||||
from amaranth._utils import _ignore_deprecated
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import operator
|
|||
from unittest import TestCase
|
||||
|
||||
from amaranth.hdl import *
|
||||
from amaranth.hdl.ast import ShapeCastable
|
||||
from amaranth.hdl._ast import ShapeCastable
|
||||
from amaranth.lib.data import *
|
||||
from amaranth.sim import Simulator
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import unittest
|
|||
from types import SimpleNamespace as NS
|
||||
|
||||
from amaranth import *
|
||||
from amaranth.hdl.ast import ValueCastable
|
||||
from amaranth.hdl._ast import ValueCastable
|
||||
from amaranth.lib import data, enum
|
||||
from amaranth.lib.wiring import Flow, In, Out, Member
|
||||
from amaranth.lib.wiring import SignatureError, SignatureMembers, FlippedSignatureMembers
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ import warnings
|
|||
from contextlib import contextmanager
|
||||
|
||||
from amaranth._utils import flatten
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl.cd import *
|
||||
from amaranth.hdl.mem import *
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.hdl._cd import *
|
||||
from amaranth.hdl._mem import *
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
|
||||
from amaranth.hdl.rec import *
|
||||
from amaranth.hdl.dsl import *
|
||||
from amaranth.hdl.ir import *
|
||||
from amaranth.hdl._dsl import *
|
||||
from amaranth.hdl._ir import *
|
||||
from amaranth.sim import *
|
||||
|
||||
from .utils import *
|
||||
|
|
@ -695,10 +695,10 @@ class SimulatorIntegrationTestCase(FHDLTestCase):
|
|||
@ValueCastable.lowermethod
|
||||
def as_value(self):
|
||||
return Signal()
|
||||
|
||||
|
||||
def shape():
|
||||
return unsigned(1)
|
||||
|
||||
|
||||
a = Array([1,2,3])
|
||||
a[MyValue()]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl._ast import *
|
||||
from types import SimpleNamespace
|
||||
|
||||
from .utils import *
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import textwrap
|
|||
import traceback
|
||||
import unittest
|
||||
|
||||
from amaranth.hdl.ast import *
|
||||
from amaranth.hdl.ir import *
|
||||
from amaranth.hdl._ast import *
|
||||
from amaranth.hdl._ir import *
|
||||
from amaranth.back import rtlil
|
||||
from amaranth._toolchain import require_tool
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue