Skip to content

Decoder - #16

Closed
YunseonShin wants to merge 2 commits into
developfrom
decoder
Closed

YunseonShin wants to merge 2 commits into
developfrom
decoder

Conversation

@YunseonShin

Copy link
Copy Markdown
Collaborator

I implemented tile graph generator (a.k.a. decoder) and add a gitignore file

Comment thread decoder.py Outdated
with open(os.path.join(self.dir, file), 'r') as asm:
asm_code = asm.read()
for branch in branches:
asm_code = asm_code.replace(branch, "nop") # FIXME. remove the branch instruction

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Polishing is needed

Comment thread decoder.py Outdated
def __call__(self, file):
self.decode(file)

def preprocess(self, file): # for single tile

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about add some comment that explains this function

Comment thread decoder.py
self.connect_node(node, node2)
else: # node2.type == "Compute"
if node.search_reg(node2.inst[2]) or node.search_reg(node2.inst[3]):
self.connect_node(node, node2)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider register renaming algorithm

Comment thread decoder.py
"vl2re32.v", "vl2re64.v", "vl2re8.v", "vl2re16.v"]
stores = ["vse32.v", "vse64.v", "vse8.v", "vse16.v",
"vs2r.v", "vs2re32.v", "vs2re64.v", "vs2re8.v", "vs2re16.v"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use capital when using global variable

Comment thread decoder.py Outdated
queue = []
for root in self.dummy_node.children:
root.visited = True
queue.append(root)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?
self.dummy_node.visited = True
queue = [self.dummy_node]

@YWHyuk

YWHyuk commented Jan 17, 2024

Copy link
Copy Markdown
Collaborator

We have to support gemmini style instruction. This feature should be added!
@YunSunny00

@YWHyuk YWHyuk closed this Jan 26, 2024
@YWHyuk
YWHyuk deleted the decoder branch January 29, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants