Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions fpga_arch_parser/src/parse_port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ pub fn parse_port<R: BufRead>(
}
"port_class" => {
port_class = match port_class {
None => match parse_port_class(&a.value, parser.position()) {
Ok(pc) => Some(pc),
Err(e) => return Err(e),
},
None => {
let pc = parse_port_class(&a.value, parser.position())?;
Some(pc)
}
Some(_) => {
return Err(FPGAArchParseError::DuplicateAttribute(
a.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion fpga_arch_viewer/src/block_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub fn draw_block(
painter.rect_stroke(
rect,
egui::CornerRadius::ZERO,
egui::Stroke::new(2.0, outline_color),
egui::Stroke::new(2.0_f32, outline_color),
egui::epaint::StrokeKind::Inside,
);
} // Future shapes can be added here
Expand Down
4 changes: 2 additions & 2 deletions fpga_arch_viewer/src/crr_sb_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ fn build_switch_connection_shapes(
src_node_loc + sb_rect.min.to_vec2(),
sink_node_loc + sb_rect.min.to_vec2(),
],
egui::Stroke::new(1.0, wire_color),
egui::Stroke::new(1.0_f32, wire_color),
));
}

Expand Down Expand Up @@ -1107,7 +1107,7 @@ fn build_lb_connection_shapes(
for sink_node_loc in &sink_node_locs {
lb_connection_shapes.push(egui::Shape::line_segment(
[src_node_loc.to_pos2(), sink_node_loc.to_pos2()],
egui::Stroke::new(1.0, wire_color),
egui::Stroke::new(1.0_f32, wire_color),
));
}
}
Expand Down
13 changes: 8 additions & 5 deletions fpga_arch_viewer/src/grid_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl GridRenderer {
rect,
egui::CornerRadius::ZERO,
egui::Stroke::new(
0.5,
0.5_f32,
color_scheme::theme_border_color(dark_mode),
),
egui::epaint::StrokeKind::Inside,
Expand Down Expand Up @@ -96,7 +96,7 @@ impl GridRenderer {
self.grid_shapes[die_id].push(egui::Shape::rect_stroke(
rect,
egui::CornerRadius::ZERO,
egui::Stroke::new(1.0, outline_color),
egui::Stroke::new(1.0_f32, outline_color),
egui::epaint::StrokeKind::Inside,
));

Expand Down Expand Up @@ -133,7 +133,7 @@ impl GridRenderer {
egui::Pos2::new(cut_x, 0.0),
egui::Pos2::new(cut_x, grid.height as f32 * cell_size),
],
stroke: egui::Stroke::new(2.0, egui::Color32::RED),
stroke: egui::Stroke::new(2.0_f32, egui::Color32::RED),
});
}
for horizontal_cut in &grid.grid_layers[die_id].horizontal_interposer_cut_lines {
Expand All @@ -143,7 +143,7 @@ impl GridRenderer {
egui::Pos2::new(0.0, cut_y),
egui::Pos2::new(grid.width as f32 * cell_size, cut_y),
],
stroke: egui::Stroke::new(2.0, egui::Color32::RED),
stroke: egui::Stroke::new(2.0_f32, egui::Color32::RED),
});
}
}
Expand Down Expand Up @@ -235,7 +235,10 @@ impl GridRenderer {
};
noc_shapes.push(egui::Shape::line_segment(
[from_pos, to_pos],
egui::Stroke::new(2.0, color_scheme::theme_text_color(dark_mode)),
egui::Stroke::new(
2.0_f32,
color_scheme::theme_text_color(dark_mode),
),
));
}
}
Expand Down
4 changes: 2 additions & 2 deletions fpga_arch_viewer/src/intra_tile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ fn draw_direct_connection(
color_scheme::theme_interconnect_bg(dark_mode)
};

let stroke_width = if is_highlighted { 2.5 } else { 1.5 };
let stroke_width = if is_highlighted { 2.5_f32 } else { 1.5_f32 };
let stroke = egui::Stroke::new(stroke_width, stroke_color);

// Check if this is a clock connection using port class instead of string matching
Expand Down Expand Up @@ -1885,7 +1885,7 @@ fn draw_interconnect_block(
// route them via a top rail to avoid long horizontal segments cutting across many blocks.
let top_rail_y = {
let mut min_child_y = f32::INFINITY;
for (_, r) in state.pb_rects.iter() {
for r in state.pb_rects.values() {
// Only consider children that are inside this parent PB rect.
if parent_rect.contains(r.center()) {
min_child_y = min_child_y.min(r.min.y);
Expand Down
8 changes: 4 additions & 4 deletions fpga_arch_viewer/src/summary_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl SummaryView {

for (tile_idx, tile) in arch.tiles.iter().enumerate() {
ui.horizontal(|ui| {
ui.collapsing(format!("[{}] Tile: {}", tile_idx, &tile.name), |ui| {
ui.collapsing(format!("[{}] Tile: {}", tile_idx, tile.name), |ui| {
ui.label(format!(
"Dimensions: {}x{} (Area: {})",
tile.width,
Expand All @@ -93,7 +93,7 @@ impl SummaryView {
});

if ui
.button(format!("View {} Tile Details", &tile.name))
.button(format!("View {} Tile Details", tile.name))
.clicked()
{
*selected_tile_name = Some(tile.name.clone());
Expand Down Expand Up @@ -165,7 +165,7 @@ impl SummaryView {
ui.collapsing("Segments", |ui| {
for (seg_idx, segment) in arch.segment_list.iter().enumerate() {
ui.collapsing(
format!("[{}] L{}: {}", seg_idx, segment.length, &segment.name),
format!("[{}] L{}: {}", seg_idx, segment.length, segment.name),
|ui| {
ui.label(format!("Axis: {:?}", segment.axis));
ui.label(format!("Type: {:?}", segment.segment_type));
Expand Down Expand Up @@ -200,7 +200,7 @@ impl SummaryView {
for (pb_idx, pb_type) in arch.complex_block_list.iter().enumerate() {
ui.horizontal(|ui| {
ui.collapsing(
format!("[{}] Complex Block: {}", pb_idx, &pb_type.name),
format!("[{}] Complex Block: {}", pb_idx, pb_type.name),
|ui| {
ui.label(format!("Number of blocks: {}", pb_type.num_pb));
ui.label(format!("Modes: {}", pb_type.modes.len()));
Expand Down
6 changes: 3 additions & 3 deletions fpga_arch_viewer/src/tile_rendering/tile_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn build_render_tile(
lb_shapes.push(egui::Shape::rect_stroke(
*tile_bounding_box,
egui::CornerRadius::ZERO,
egui::Stroke::new(2.0, block_style::darken_color(*color, 0.5)),
egui::Stroke::new(2.0_f32, block_style::darken_color(*color, 0.5)),
egui::epaint::StrokeKind::Inside,
));
// Draw lines to distinguish the grid-tile lines.
Expand All @@ -57,7 +57,7 @@ pub fn build_render_tile(
egui::pos2(x_offset, tile_bounding_box.top()),
egui::pos2(x_offset, tile_bounding_box.bottom()),
],
egui::Stroke::new(1.0, block_style::darken_color(*color, 0.5)),
egui::Stroke::new(1.0_f32, block_style::darken_color(*color, 0.5)),
));
}
for j in 1..tile.height {
Expand All @@ -68,7 +68,7 @@ pub fn build_render_tile(
egui::pos2(tile_bounding_box.left(), y_offset),
egui::pos2(tile_bounding_box.right(), y_offset),
],
egui::Stroke::new(1.0, block_style::darken_color(*color, 0.5)),
egui::Stroke::new(1.0_f32, block_style::darken_color(*color, 0.5)),
));
}

Expand Down
2 changes: 1 addition & 1 deletion fpga_arch_viewer/src/tile_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl TileView {
ui.separator();

for (idx, sub_tile) in tile.sub_tiles.iter().enumerate() {
ui.collapsing(format!("[{}] {}", idx, &sub_tile.name), |ui| {
ui.collapsing(format!("[{}] {}", idx, sub_tile.name), |ui| {
ui.label(format!("Capacity: {}", sub_tile.capacity));
ui.label(format!("Ports: {}", sub_tile.ports.len()));

Expand Down
Loading