Skip to content
Snippets Groups Projects
Commit b0b8b9b5 authored by Martin Högstedt's avatar Martin Högstedt
Browse files

fixed comments

parent 0cea0499
Branches
No related tags found
1 merge request!13We know have asm instructions, can step forward and backward between clock cycle and asm instructions
Pipeline #131571 passed
......@@ -132,7 +132,8 @@ class GUI(QMainWindow):
self.cpu_running = False
self.pipeline = PipeLine()
self.pipeline.show()
# Hide pipeline for now since it is not implemented yet
# self.pipeline.show()
# Set Style, THESE ARE TEST AND DONT WORK
app = QApplication.instance()
......@@ -571,8 +572,6 @@ class GUI(QMainWindow):
"""
self.cpu.stop()
# TODO: What is the difference between folderSaveDialog and folderLoadDialog?
def folderSaveDialog(self) -> str:
"""
Opens a file explorer in a new window. Returns the absolute path to the selected file.
......
......@@ -12,6 +12,8 @@ class PipeLine(QTableWidget):
def __init__(self):
super().__init__()
# Values below are temporary test values
"""
self.setRowCount(5)
self.setColumnCount(5)
self.instructions = ["Add", "Sub", "Mult", "Fetch", "Nop"]
......@@ -19,20 +21,22 @@ class PipeLine(QTableWidget):
self.set_item(1, 1, self.instructions[1])
self.set_item(2, 2, self.instructions[2])
self.set_item(3, 3, self.instructions[3])
"""
def set_instruction(self, instructions: list[str]):
def set_instruction(self, instructions: list[str]) -> None:
"""Give the pipeline the current CPU instructions."""
self.instrucitons = instructions
def set_height(self, height: int):
def set_height(self, height: int) -> None:
"""Sets the height of the pipeline."""
self.setColumnCount(height)
def set_width(self, width: int):
def set_width(self, width: int) -> None:
"""Sets the width of the pipeline."""
self.setRowCount(width)
def set_row_labels(self, labels: list[str]):
def set_row_labels(self, labels: list[str]) -> None:
"""
Sets the lable for each row. Does not gurantee that number of labels match rows.
......@@ -44,7 +48,7 @@ class PipeLine(QTableWidget):
"""
raise NotImplemented
def set_col_labels(self, labels: list[str]):
def set_col_labels(self, labels: list[str]) -> None:
"""
Sets the lable for each col. Does not gurantee that number of labels match cols.
......@@ -54,7 +58,7 @@ class PipeLine(QTableWidget):
"""
raise NotImplemented
def set_item(self, row: int, col: int, text: str):
def set_item(self, row: int, col: int, text: str) -> None:
"""Sets the text at position col row to the given text."""
item = QTableWidgetItem(text)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment