FPGA-Research-Manchester / FABulator

Fabric generator and CAD tools graphical frontend
Apache License 2.0
7 stars 3 forks source link

Feature request: Unload FASM file #8

Open IAmMarcelJung opened 6 months ago

IAmMarcelJung commented 6 months ago

It would be nice if unloading a .fasm file was possible, so that all connections set in it are not longer visible. All user defined connections or colours should however be preserved. This might cause conflict if the user changed connections previously set by the .fasm file, so it has to be decided whether those connection should be kept or deleted.

JakobTernes commented 6 months ago

Hi! I just pushed a commit into the develop branch that adds this feature. About the coloring: If after loading a .fasm file the user defined a color for a wire affected, this will be reset to the default color when unloading (the same way that loading a .fasm file overwrites any user defined highlighting of the affected wires). Someday, this might be made customizable, such that the user can specify whether to keep highlighting when loading/unloading a .fasm file. Any user defined highlighting on other wires will be unaffected. Any feedback is appreciated! Cheers

IAmMarcelJung commented 6 months ago

Awesome!

If after loading a .fasm file the user defined a color for a wire affected, this will be reset to the default color when unloading (the same way that loading a .fasm file overwrites any user defined highlighting).

As long as this is the case, I suggest that a warning should appear, telling the user that the defined highlighting is overwritten.

Any user defined highlighting on other wires will be unaffected.

So if I understand this correctly, the highlighting only changes for any wire defined in the .fasm file? Because you said before that any user defined highlighting would be overwritten. The former would be be nice!

I don't know how the highlighting is stored internally, but maybe a simple solution for letting the user decide what to keep would be to save all user defined highlighting, then overwrite it with the FASM-defined highlighting and then reapply the saved highlighting (if the user chose to keep the user defined highlighting). The two configuration could then be seen as two "masks" that just overwrite the wires defined in it, but leave all other wires untouched. This would even make it possible to switch between the two views! (Again, I have no clue if this is viable with the current implementation or maybe also resource hungry).

Let me know what you think of this!

JakobTernes commented 5 months ago

What I mean here is any wire affected by the highlighting due to the .fasm file.