Skip to content

Commit

Permalink
Fixup str format
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed May 23, 2019
1 parent 3b93070 commit 5b6a2fb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions magma/bits.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ def __getitem__(cls, index):

def __str__(cls):
if cls.isinput():
return "In(UInt({}))".format(cls.N)
return "In(UInt[{}])".format(cls.N)
if cls.isoutput():
return "Out(UInt({}))".format(cls.N)
return "UInt({})".format(cls.N)
return "Out(UInt[{}])".format(cls.N)
return "UInt[{}]".format(cls.N)

def qualify(cls, direction):
if cls.T.isoriented(direction):
Expand Down Expand Up @@ -247,10 +247,10 @@ def __getitem__(cls, index):

def __str__(cls):
if cls.isinput():
return "In(SInt({}))".format(cls.N)
return "In(SInt[{}])".format(cls.N)
if cls.isoutput():
return "Out(SInt({}))".format(cls.N)
return "SInt({})".format(cls.N)
return "Out(SInt[{}])".format(cls.N)
return "SInt[{}]".format(cls.N)

def qualify(cls, direction):
if cls.T.isoriented(direction):
Expand Down Expand Up @@ -321,10 +321,10 @@ def __getitem__(cls, index):

def __str__(cls):
if cls.isinput():
return "In(BFloat({}))".format(cls.N)
return "In(BFloat[{}])".format(cls.N)
if cls.isoutput():
return "Out(BFloat({}))".format(cls.N)
return "BFloat({})".format(cls.N)
return "Out(BFloat[{}])".format(cls.N)
return "BFloat[{}]".format(cls.N)

def qualify(cls, direction):
if cls.T.isoriented(direction):
Expand Down

0 comments on commit 5b6a2fb

Please sign in to comment.