Commit f4e7199f authored by Théotime BOLLENGIER's avatar Théotime BOLLENGIER
Browse files

show unused routes as option

parent 665272fc
......@@ -49,9 +49,10 @@ module ArGen
end
def write_architecture_used_resources (fileName: nil, compress: nil, printTilesBoundaries: nil, inverseColor: nil, drawPinNumbers: true, max_width: nil, max_height: nil, quiet: false)
def write_architecture_used_resources (fileName: nil, compress: nil, printTilesBoundaries: nil, inverseColor: nil, drawPinNumbers: true, max_width: nil, max_height: nil, quiet: false, show_default_routes: false)
@@inverseColor = not(not(inverseColor))
@@drawPinNumbers = not(not(drawPinNumbers))
@@dontPrintUnusedRoutes = not(show_default_routes)
compress = not(not(compress))
printTilesBoundaries = not(not(printTilesBoundaries))
if fileName.class != String then
......@@ -298,7 +299,7 @@ module ArGen
## IO output connections ##
@ioBlocks.each do |ioBlock|
ioBlock.ios.each do |io|
if false then
if Architecture::Arch::dontPrintUnusedRoutes then
next unless io.outputPin.used
io.outputPin.fanouts.each do |trackMux|
next if trackMux.routedInputIndex.nil? or trackMux.inputs[trackMux.routedInputIndex] != io.outputPin
......@@ -319,7 +320,7 @@ module ArGen
## CLB output connections ##
@clbs.each do |clb|
clb.outputs.each do |opin|
if false then
if Architecture::Arch::dontPrintUnusedRoutes then
next unless opin.used
opin.fanouts.each do |trackMux|
next if trackMux.routedInputIndex.nil? or trackMux.inputs[trackMux.routedInputIndex] != opin
......@@ -349,7 +350,7 @@ module ArGen
def placement_and_routing_to_svg_switch_box_connections (ofile)
@channels.each do |channel|
channel.tracks.each do |track|
if false then
if Architecture::Arch::dontPrintUnusedRoutes then
next if track.driverMux.routedInputIndex.nil?
inputTrack = track.driverMux.inputs[track.driverMux.routedInputIndex]
next unless inputTrack.class == Architecture::Track ## the input is not a track, it's a CLB output, we will print it later
......@@ -667,7 +668,7 @@ module ArGen
attr_accessor :tag
def placement_and_routing_to_svg (ofile, tileSideLength)
if false then
if Architecture::Arch::dontPrintUnusedRoutes then
return unless @used
if @tag then
if @orientation == :horizontal then
......
......@@ -49,6 +49,7 @@ module ArGen
def self.svg_color_lightgreen; @@svg_color_lightgreen; end
def self.svg_color_unusedtrack; @@svg_color_unusedtrack; end
def self.draw_pin_numbers; @@drawPinNumbers; end
def self.dontPrintUnusedRoutes; @@dontPrintUnusedRoutes; end
def write_architecture_resources (fileName: nil, compress: nil, printTilesBoundaries: nil, inverseColor: nil, max_width: nil, max_height: nil, quiet: false)
compress = not(not(compress))
......
# Copyright (C) 2017-2019 ENSTA Bretagne
# Copyright (C) 2017-2020 ENSTA Bretagne
# Author: Théotime Bollengier <theotime.bollengier@ensta-bretagne.fr>
#
# This file is part of ArGen. <https://gitlab.ensta-bretagne.fr/argen/argen>
......@@ -23,7 +23,7 @@ require_relative '../../lib/argen/par_loader.rb'
require_relative '../../lib/argen/graphics/place_and_route_viewer.rb'
$copyright = "Copyright (C) 2017-2019 ENSTA Bretagne"
$copyright = "Copyright (C) 2017-2020 ENSTA Bretagne"
$authors = [
["Théotime Bollengier", "<theotime.bollengier@ensta-bretagne.fr>"]
]
......@@ -78,6 +78,11 @@ optparse = OptionParser.new do |opts|
options[:height] = n.to_i.abs
end
options[:show_default_routes] = false
opts.on('--show_default_routes', 'Show routes not used by the netlist') do
options[:show_default_routes] = true
end
opts.on('-h', '--help', 'Display this help') do
puts opts
puts $description_string
......@@ -114,5 +119,6 @@ arch.write_architecture_used_resources(fileName: options[:output],
inverseColor: options[:negate],
drawPinNumbers: not(options[:nonum]),
max_width: options[:width],
max_height: options[:height])
max_height: options[:height],
show_default_routes: options[:show_default_routes])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment