Skip to content

Commit

Permalink
floogen: Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Sep 13, 2024
1 parent adc7b13 commit 9cafa53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion floogen/model/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def req_name(self, port=False, idx=False) -> str:
"""Return the request name of the protocol."""
idx = self._idx_to_sv_idx() if idx else ""
if port:
return f"{self.base_name}_req_{self.direction[0]}{idx}"
return f"{self.base_name}_req_{str(self.direction)[0]}{idx}"
return f"{self.source}_to_{self.dest}_req"

def rsp_name(self, port=False, idx=False) -> str:
Expand Down
6 changes: 4 additions & 2 deletions floogen/model/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,10 @@ def render_route_cfg(self, name) -> str:
"RouteAlgo": self.route_algo.value,
"UseIdTable": bool_to_sv(self.use_id_table),
"XYAddrOffsetX": self.addr_offset_bits if self.route_algo == RouteAlgo.XY else 0,
"XYAddrOffsetY": self.addr_offset_bits + self.num_x_bits if self.route_algo == RouteAlgo.XY else 0,
"IdAddrOffset": self.addr_offset_bits if self.route_algo == RouteAlgo.ID and not self.use_id_table else 0,
"XYAddrOffsetY": self.addr_offset_bits + self.num_x_bits if
self.route_algo == RouteAlgo.XY else 0,
"IdAddrOffset": self.addr_offset_bits if
self.route_algo == RouteAlgo.ID and not self.use_id_table else 0,
"NumSamRules": len(self.sam),
"NumRoutes": len(self.table) if self.table is not None else 0,
}
Expand Down

0 comments on commit 9cafa53

Please sign in to comment.