├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── QtFlow ├── CMakeLists.txt ├── buildflow.cpp ├── buildflow.h ├── buildflow.ui ├── console.ui ├── editortabmanager.cpp ├── editortabmanager.h ├── files.ui ├── fileselector.cpp ├── fileselector.h ├── grid.cpp ├── grid.h ├── grid.ui ├── librarysettings.ui ├── main.cpp ├── mainapplication.cpp ├── mainapplication.h ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── modules.ui ├── moduleselector.cpp ├── moduleselector.h ├── moduleslistmodel.cpp ├── moduleslistmodel.h ├── modulestreemodel.cpp ├── modulestreemodel.h ├── new.cpp ├── new.h ├── new.ui ├── project.cpp ├── project.h ├── project_padframe.cpp ├── projects.ui ├── projectselector.cpp ├── projectselector.h ├── projectsettings.cpp ├── projectsettings.h ├── projectsettings.ui ├── projectsitem.cpp ├── projectsitem.h ├── projectstreemodel.cpp ├── projectstreemodel.h ├── pyprojectsettings.cpp ├── pyprojectsettings.h ├── pysettings.cpp ├── pysettings.h ├── pythonconsoledockwidget.cpp ├── pythonconsoledockwidget.h ├── qtflow.linux.ini ├── qtflow.qrc ├── qtflowfilelist.cpp ├── qtflowfilelist.h ├── qtreeviewdragdrop.cpp ├── qtreeviewdragdrop.h ├── savechanges.cpp ├── savechanges.h ├── savechanges.ui ├── settings.cpp ├── settings.h ├── settings.ui ├── specialnets.cpp ├── specialnets.h ├── specialnets.ui ├── templates.cpp ├── templates.h ├── templates.ui ├── wave.cpp ├── wave.h ├── wave.ui ├── welcome.cpp ├── welcome.h └── welcome.ui ├── README.md ├── blif ├── blif.pri ├── blifdata.cpp ├── blifdata.h ├── blifdatacomponentinfo.cpp └── blifdatacomponentinfo.h ├── cmap_reader ├── CMakeLists.txt ├── cmap_reader.pri ├── colormap.cpp └── colormap.h ├── contacts ├── CMakeLists.txt ├── contactplacement.cpp ├── contactplacement.h ├── contactplacement.ui ├── contacts.pri ├── contactsview.cpp ├── contactsview.h ├── padinfo.cpp └── padinfo.h ├── def ├── CMakeLists.txt ├── def_editor.cpp ├── def_editor_app.cpp ├── def_editor_app.h ├── def_parser.yy ├── def_scanner.ll ├── defdata.cpp ├── defdata.h ├── defdatapin.cpp ├── defdatapin.h ├── deflayouteditor.cpp ├── deflayouteditor.h ├── deflayouteditorwidget.cpp ├── deflayouteditorwidget.h ├── defmoduleinfo.cpp ├── defmoduleinfo.h ├── defrouteinfo.cpp ├── defrouteinfo.h ├── defscanner.cpp └── defscanner.h ├── gds2 ├── CMakeLists.txt ├── gds2.pri ├── gdsboundary.cpp ├── gdsboundary.h ├── gdscell.cpp ├── gdscell.h ├── gdsfile.cpp ├── gdsfile.h ├── gdspoint.cpp ├── gdspoint.h ├── gdtdata.cpp ├── gdtdata.h └── kvstypes.h ├── helpers ├── CMakeLists.txt ├── blif2BSpice.c ├── blif2BSpice.pro ├── blif2Verilog.c ├── blif2Verilog.pro ├── blifFanout.c ├── blifFanout.pro ├── hash.c ├── hash.h ├── readliberty.c ├── readliberty.h ├── spice2delay.c ├── spice2delay.pro ├── vesta.c └── vesta.pro ├── icons ├── .directory ├── CREDITS ├── about.svg ├── add.svg ├── add_arc.svg ├── add_bus.svg ├── add_bus2bus.svg ├── add_circle.svg ├── add_component.svg ├── add_corner.svg ├── add_dashed_line.svg ├── add_dimension.svg ├── add_entry.svg ├── add_glabel.svg ├── add_hierar_pin.svg ├── add_hierarchical_label.svg ├── add_hierarchical_subsheet.svg ├── add_junction.svg ├── add_keepout_area.svg ├── add_line.svg ├── add_line2bus.svg ├── add_line_label.svg ├── add_mires.svg ├── add_pin.svg ├── add_polygon.svg ├── add_power.svg ├── add_rectangle.svg ├── add_text.svg ├── add_tracks.svg ├── add_tracks_and_vias.svg ├── add_via.svg ├── add_zone.svg ├── add_zone_cutout.svg ├── align_items.svg ├── anchor.svg ├── annotate.svg ├── annotate_down_right.svg ├── annotate_right_down.svg ├── apply_pad_settings.svg ├── array.svg ├── array_line.svg ├── array_module.svg ├── array_pad.svg ├── array_target.svg ├── array_text.svg ├── array_zone.svg ├── auto_associe.svg ├── auto_delete_track.svg ├── auto_track_width.svg ├── autoplace_fields.svg ├── axis3d.svg ├── axis3d_back.svg ├── axis3d_bottom.svg ├── axis3d_front.svg ├── axis3d_left.svg ├── axis3d_right.svg ├── axis3d_top.svg ├── bom.svg ├── book.svg ├── break_bus.svg ├── break_line.svg ├── browse_files.svg ├── cancel.svg ├── change_entry_orient.svg ├── checked_ok.svg ├── color_materials.svg ├── component_select_alternate_shape.svg ├── component_select_unit.svg ├── config.svg ├── contrast_mode.svg ├── copper_layers_setup.svg ├── copy.svg ├── copy_button.svg ├── copy_library.svg ├── copy_pad_settings.svg ├── copyblock.svg ├── copycomponent.svg ├── create_cmp_file.svg ├── cursor.svg ├── cursor_shape.svg ├── cut.svg ├── cut_button.svg ├── cvpcb.svg ├── dashline.svg ├── datasheet.svg ├── delete.svg ├── delete_arc.svg ├── delete_association.svg ├── delete_bus.svg ├── delete_circle.svg ├── delete_connection.svg ├── delete_cotation.svg ├── delete_dimension.svg ├── delete_field.svg ├── delete_glabel.svg ├── delete_line.svg ├── delete_module.svg ├── delete_net.svg ├── delete_node.svg ├── delete_pad.svg ├── delete_pin.svg ├── delete_pinsheet.svg ├── delete_polygon.svg ├── delete_rectangle.svg ├── delete_segment.svg ├── delete_sheet.svg ├── delete_text.svg ├── delete_track.svg ├── dialog_warning.svg ├── directory.svg ├── display_options.svg ├── distribute_horizontal.svg ├── distribute_vertical.svg ├── document-save-all.svg ├── document-save-as.svg ├── document-save.svg ├── down.svg ├── drag.svg ├── drag_module.svg ├── drag_outline_segment.svg ├── drag_pad.svg ├── drag_segment_withslope.svg ├── drag_track_segment.svg ├── drc.svg ├── drc2.svg ├── drc_off.svg ├── duplicate.svg ├── duplicate_line.svg ├── duplicate_module.svg ├── duplicate_pad.svg ├── duplicate_target.svg ├── duplicate_text.svg ├── duplicate_zone.svg ├── edges_sketch.svg ├── edit.svg ├── edit_comp_footprint.svg ├── edit_comp_ref.svg ├── edit_comp_value.svg ├── edit_component.svg ├── edit_module.svg ├── edit_part.svg ├── edit_sheet.svg ├── edit_text.svg ├── editor.svg ├── eeschema.svg ├── enter_sheet.svg ├── erc.svg ├── erc_green.svg ├── ercerr.svg ├── ercwarn.svg ├── exchange.svg ├── exit.svg ├── export.svg ├── export_dsn.svg ├── export_footprint_names.svg ├── export_idf.svg ├── export_module.svg ├── export_options_pad.svg ├── fabrication.svg ├── file_footprint.svg ├── fill_zone.svg ├── find.svg ├── find_replace.svg ├── flag.svg ├── flip_board.svg ├── fonts.svg ├── footprint_text.svg ├── gbr_select_mode0.svg ├── gbr_select_mode1.svg ├── gbr_select_mode2.svg ├── general_deletions.svg ├── general_ratsnest.svg ├── gerber_file.svg ├── gerber_job_file.svg ├── gerber_recent_files.svg ├── gerbview_clear_layers.svg ├── gerbview_drill_file.svg ├── gerbview_open_recent_drill_files.svg ├── gerbview_show_negative_objects.svg ├── gl_change.svg ├── glabel2label.svg ├── glabel2text.svg ├── global_options_pad.svg ├── go_down.svg ├── go_home.svg ├── go_next.svg ├── go_previous.svg ├── go_up.svg ├── green.svg ├── grid.svg ├── grid_select.svg ├── grid_select_axis.svg ├── hammer.svg ├── help.svg ├── hidden_pin.svg ├── hierarchy_cursor.svg ├── hierarchy_nav.svg ├── hotkeys.svg ├── hotkeys_export.svg ├── hotkeys_import.svg ├── html.svg ├── icon.svg ├── icon_3d.svg ├── icon_background_metal.svg ├── icon_bitmap2component.svg ├── icon_cvpcb.svg ├── icon_cvpcb_small.svg ├── icon_eeschema.svg ├── icon_gerbview.svg ├── icon_gerbview_small.svg ├── icon_kicad.svg ├── icon_libedit.svg ├── icon_modedit.svg ├── icon_pagelayout_editor.svg ├── icon_pcbcalculator.svg ├── icon_pcbnew.svg ├── icon_txt.svg ├── icons.qrc ├── image.svg ├── import.svg ├── import3d.svg ├── import_brd_file.svg ├── import_cmp_from_lib.svg ├── import_footprint_names.svg ├── import_hierarchical_label.svg ├── import_module.svg ├── import_setup.svg ├── info.svg ├── insert_module_board.svg ├── invisible_text.svg ├── kicad_icon_small.svg ├── kicad_logo.svg ├── kicad_logo_for_patch.svg ├── label.svg ├── label2glabel.svg ├── label2text.svg ├── lang_bg.svg ├── lang_catalan.svg ├── lang_chinese.svg ├── lang_cs.svg ├── lang_de.svg ├── lang_def.svg ├── lang_en.svg ├── lang_es.svg ├── lang_fi.svg ├── lang_fr.svg ├── lang_gr.svg ├── lang_hu.svg ├── lang_it.svg ├── lang_jp.svg ├── lang_ko.svg ├── lang_lt.svg ├── lang_nl.svg ├── lang_pl.svg ├── lang_pt.svg ├── lang_ru.svg ├── lang_sk.svg ├── lang_sl.svg ├── language.svg ├── layers_manager.svg ├── leave_sheet.svg ├── left.svg ├── lib_next.svg ├── lib_previous.svg ├── libedit.svg ├── libedit_icon.svg ├── libedprt.svg ├── library.svg ├── library2.svg ├── library_archive.svg ├── library_archive_as.svg ├── library_browse.svg ├── library_table.svg ├── library_update.svg ├── libview.svg ├── lines90.svg ├── list_nets.svg ├── load_module_board.svg ├── load_module_lib.svg ├── local_ratsnest.svg ├── locked.svg ├── macros_record.svg ├── many_good_icons.svg ├── measurement.svg ├── media-playback-pause.svg ├── media-playback-start.svg ├── media-playback-stop.svg ├── media-seek-backward.svg ├── media-seek-forward.svg ├── media-skip-backward.svg ├── media-skip-forward.svg ├── minus.svg ├── mirepcb.svg ├── mirror_footprint_axisX.svg ├── mirror_footprint_axisY.svg ├── mirror_h.svg ├── mirror_v.svg ├── mode_module.svg ├── mode_track.svg ├── modratsnest.svg ├── module.svg ├── module_check.svg ├── module_editor.svg ├── module_filtered_list.svg ├── module_full_list.svg ├── module_library_list.svg ├── module_name_filtered_list.svg ├── module_options.svg ├── module_pin_filtered_list.svg ├── module_ratsnest.svg ├── module_wizard.svg ├── modview_icon.svg ├── morgan1.svg ├── morgan2.svg ├── move.svg ├── move_arc.svg ├── move_circle.svg ├── move_exactly.svg ├── move_field.svg ├── move_glabel.svg ├── move_line.svg ├── move_module.svg ├── move_pad.svg ├── move_pin.svg ├── move_pinsheet.svg ├── move_polygon.svg ├── move_rectangle.svg ├── move_relative.svg ├── move_sheet.svg ├── move_target.svg ├── move_text.svg ├── move_track.svg ├── move_track_segment.svg ├── move_zone.svg ├── mw_add_gap.svg ├── mw_add_line.svg ├── mw_add_shape.svg ├── mw_add_stub.svg ├── mw_add_stub_arc.svg ├── mw_toolbar.svg ├── net_highlight.svg ├── net_highlight_schematic.svg ├── net_locked.svg ├── net_unlocked.svg ├── netlist.svg ├── new_component.svg ├── new_cvpcb.svg ├── new_footprint.svg ├── new_generic.svg ├── new_library.svg ├── new_pcb.svg ├── new_project.svg ├── new_project_with_template.svg ├── new_sch.svg ├── noconn.svg ├── normal.svg ├── online_help.svg ├── open_brd_file.svg ├── open_document.svg ├── open_library.svg ├── open_project.svg ├── opt_show_polygon.svg ├── options_3drender.svg ├── options_all_tracks.svg ├── options_all_tracks_and_vias.svg ├── options_all_vias.svg ├── options_arc.svg ├── options_circle.svg ├── options_module.svg ├── options_new_pad.svg ├── options_pad.svg ├── options_pin.svg ├── options_pinsheet.svg ├── options_rectangle.svg ├── options_segment.svg ├── options_text.svg ├── options_track.svg ├── options_tracks.svg ├── options_vias.svg ├── orient.svg ├── ortho.svg ├── pad.svg ├── pad_dimensions.svg ├── pad_enumerate.svg ├── pad_sketch.svg ├── pads_mask_layers.svg ├── pagelayout_load.svg ├── pagelayout_load_default.svg ├── pagelayout_new.svg ├── pagelayout_normal_view_mode.svg ├── pagelayout_recent.svg ├── pagelayout_special_view_mode.svg ├── palette.svg ├── part_properties.svg ├── paste.svg ├── path.svg ├── pcb_offset.svg ├── pcb_update.svg ├── pcbcalculator.svg ├── pcbnew.svg ├── pin.svg ├── pin2pin.svg ├── pin_name_to.svg ├── pin_number_to.svg ├── pin_show_etype.svg ├── pin_size_to.svg ├── pin_table.svg ├── pin_to.svg ├── pinorient_down.svg ├── pinorient_left.svg ├── pinorient_right.svg ├── pinorient_up.svg ├── pinshape_active_low_input.svg ├── pinshape_active_low_output.svg ├── pinshape_clock_active_low.svg ├── pinshape_clock_fall.svg ├── pinshape_clock_invert.svg ├── pinshape_clock_normal.svg ├── pinshape_invert.svg ├── pinshape_nonlogic.svg ├── pinshape_normal.svg ├── pintype_3states.svg ├── pintype_bidi.svg ├── pintype_input.svg ├── pintype_noconnect.svg ├── pintype_notspecif.svg ├── pintype_opencoll.svg ├── pintype_openemit.svg ├── pintype_output.svg ├── pintype_passive.svg ├── pintype_powerinput.svg ├── pintype_poweroutput.svg ├── plot.svg ├── plot_dxf.svg ├── plot_hpg.svg ├── plot_pdf.svg ├── plot_ps.svg ├── plot_svg.svg ├── plus.svg ├── polar_coord.svg ├── post_compo.svg ├── post_drill.svg ├── post_module.svg ├── preference.svg ├── preference2.svg ├── print_button.svg ├── ps_diff_pair.svg ├── ps_diff_pair_gap.svg ├── ps_diff_pair_tune_length.svg ├── ps_diff_pair_tune_phase.svg ├── ps_diff_pair_via_gap.svg ├── ps_router.svg ├── ps_tune_length.svg ├── push_pad_settings.svg ├── py_script.svg ├── qflow_logo.png ├── ratsnest.svg ├── read_setup.svg ├── recent.svg ├── red.svg ├── redo.svg ├── reload.svg ├── reload2.svg ├── render_mode.svg ├── rescue.svg ├── rescue_pcbnew.svg ├── reset_text.svg ├── resize_sheet.svg ├── revert_pcbnew.svg ├── right.svg ├── rotate_ccw.svg ├── rotate_cw.svg ├── rotate_field.svg ├── rotate_glabel.svg ├── rotate_module_ccw.svg ├── rotate_module_cw.svg ├── rotate_neg_x.svg ├── rotate_neg_y.svg ├── rotate_neg_z.svg ├── rotate_pin.svg ├── rotate_pos_x.svg ├── rotate_pos_y.svg ├── rotate_pos_z.svg ├── rotatehlabel.svg ├── save.svg ├── save_as.svg ├── save_library.svg ├── save_netlist.svg ├── save_part_in_mem.svg ├── save_project.svg ├── save_setup.svg ├── schematic.svg ├── select-items.svg ├── select_grid.svg ├── select_layer_pair.svg ├── select_w_layer.svg ├── setcolor_3d_bg.svg ├── setcolor_board_body.svg ├── setcolor_copper.svg ├── setcolor_silkscreen.svg ├── setcolor_soldermask.svg ├── setcolor_solderpaste.svg ├── shape_3d.svg ├── sheetset.svg ├── show_all_back_layers.svg ├── show_all_copper_layers.svg ├── show_all_front_layers.svg ├── show_all_layers.svg ├── show_dcodenumber.svg ├── show_footprint.svg ├── show_mod_edge.svg ├── show_no_copper_layers.svg ├── show_no_layers.svg ├── show_zone.svg ├── show_zone_disable.svg ├── show_zone_outline_only.svg ├── showtrack.svg ├── sim_add_signal.svg ├── sim_probe.svg ├── sim_run.svg ├── sim_settings.svg ├── sim_stop.svg ├── sim_tune.svg ├── simulator.svg ├── spreadsheet.svg ├── svg_file.svg ├── swap_layer.svg ├── text.svg ├── text_sketch.svg ├── three_d.svg ├── tool_ratsnest.svg ├── tools.svg ├── track_locked.svg ├── track_sketch.svg ├── track_unlocked.svg ├── transistor.svg ├── tree_nosel.svg ├── tree_sel.svg ├── tune_diff_pair_length_legend.png ├── tune_diff_pair_skew_legend.png ├── tune_single_track_length_legend.png ├── undelete.svg ├── undo.svg ├── unit_inch.svg ├── unit_mm.svg ├── unknown.svg ├── unlocked.svg ├── unzip.svg ├── up.svg ├── update_module_board.svg ├── use_3D_copper_thickness.svg ├── via.svg ├── via_buried.svg ├── via_microvia.svg ├── via_sketch.svg ├── viewlibs_icon.svg ├── warning.svg ├── web_support.svg ├── width_net.svg ├── width_segment.svg ├── width_track.svg ├── width_track_select.svg ├── width_track_via.svg ├── width_vias.svg ├── window_close.svg ├── wizard_add_fplib_icon.svg ├── wizard_add_fplib_small.svg ├── zip.svg ├── zip_tool.svg ├── zone_duplicate.svg ├── zone_unfill.svg ├── zoom-fit-width.svg ├── zoom-in.svg ├── zoom-next.svg ├── zoom-out.svg ├── zoom-previous.svg ├── zoom.svg ├── zoom_area.svg ├── zoom_auto.svg ├── zoom_center_on_screen.svg ├── zoom_fit_in_page.svg ├── zoom_in.svg ├── zoom_out.svg ├── zoom_redraw.svg └── zoom_selection.svg ├── lef ├── CMakeLists.txt ├── lef.pri ├── lef_parser.yy ├── lef_scanner.ll ├── lefdata.cpp ├── lefdata.h ├── leflayer.cpp ├── leflayer.h ├── leflayerinfo.cpp ├── leflayerinfo.h ├── lefmacro.cpp ├── lefmacro.h ├── lefobstruction.cpp ├── lefobstruction.h ├── lefpin.cpp ├── lefpin.h ├── lefport.cpp ├── lefport.h ├── lefscanner.cpp ├── lefscanner.h ├── lefvia.cpp └── lefvia.h ├── magic ├── CMakeLists.txt ├── magic.pri ├── magic_editor.cpp ├── magic_editor_app.cpp ├── magic_editor_app.h ├── magic_parser.yy ├── magic_scanner.ll ├── magicdata.cpp ├── magicdata.h ├── magiclayouteditor.cpp ├── magiclayouteditor.h ├── magiclayouteditorwidget.cpp ├── magiclayouteditorwidget.h ├── magicscanner.cpp └── magicscanner.h ├── magic3d ├── CMakeLists.txt ├── glwidget.cpp ├── glwidget.h ├── magic3d.cpp ├── magic3d.h └── magic3d.pri ├── qeditor ├── CMakeLists.txt ├── codeeditorwidget.cpp ├── codeeditorwidget.h ├── editorwidget.cpp ├── editorwidget.h ├── generictexteditorwidget.cpp └── generictexteditorwidget.h ├── qlayout ├── CMakeLists.txt ├── cellmanager.ui ├── drcsettings.cpp ├── drcsettings.h ├── drcsettings.ui ├── genericlayouteditor.cpp ├── genericlayouteditor.h ├── genericlayouteditorwidget.cpp ├── genericlayouteditorwidget.h ├── layoutvisibles.cpp ├── layoutvisibles.h ├── layoutvisibles.ui ├── qlayoutcellmanager.cpp ├── qlayoutcellmanager.h ├── qlayoutdistancemeasure.cpp ├── qlayoutdistancemeasure.h ├── qlayoutlabel.cpp ├── qlayoutlabel.h ├── qlayoutmacroitem.cpp ├── qlayoutmacroitem.h ├── qlayoutmacropinitem.cpp ├── qlayoutmacropinitem.h ├── qlayoutrectitem.cpp ├── qlayoutrectitem.h ├── qlayoutscene.cpp ├── qlayoutscene.h ├── qlayoutviaitem.cpp ├── qlayoutviaitem.h ├── qlayoutwireitem.cpp ├── qlayoutwireitem.h ├── tech_data_wrapper.cpp └── tech_data_wrapper.hpp ├── qschematics ├── CMakeLists.txt ├── qschematics.pri ├── qschematicsparametricpart.cpp ├── qschematicsparametricpart.h ├── qschematicspart.cpp ├── qschematicspart.h ├── qschematicspin.cpp ├── qschematicspin.h ├── qschematicsscene.cpp ├── qschematicsscene.h ├── qschematicswire.cpp └── qschematicswire.h ├── schematics ├── CMakeLists.txt ├── parametricpart.ui ├── partselection.ui ├── schematics.pri ├── schematicseditor.cpp ├── schematicseditor.h ├── schematicseditorwidget.cpp ├── schematicseditorwidget.h ├── schematicslibraryeditor.cpp ├── schematicslibraryeditor.h ├── schematicsparametricpartdialog.cpp ├── schematicsparametricpartdialog.h ├── schematicspart.cpp ├── schematicspart.h ├── schematicspartselection.cpp ├── schematicspartselection.h ├── schematicswire.cpp └── schematicswire.h ├── schematics_reader ├── CMakeLists.txt ├── schematics_parser.yy ├── schematics_reader.pri ├── schematics_scanner.ll ├── schematicsdata.cpp ├── schematicsdata.h ├── schematicsscanner.cpp └── schematicsscanner.h ├── scripts ├── addspacers.tcl ├── blif2cel.tcl ├── blif2sym.py ├── blifanno.tcl ├── checkdirs.sh ├── cleanup.sh ├── createGDS.sh ├── decongest.tcl ├── display.sh ├── getfillcell.tcl ├── padframe.py ├── place2def.tcl ├── place2lef2.tcl ├── place2net2.tcl ├── placement.py ├── placement.sh ├── powerbus.tcl ├── preroute.py ├── qflow.sh ├── rc2vestaCleanse.py ├── router.py ├── router.sh ├── simulation.py ├── spi2xspice.py ├── synthesis.py ├── synthesize.sh ├── vesta.sh ├── ybuffer.tcl └── ypostproc.tcl ├── symbol_reader ├── CMakeLists.txt ├── schematicssymbol.cpp ├── schematicssymbol.h ├── symbol_parser.yy ├── symbol_reader.pri ├── symbol_scanner.ll ├── symboldata.cpp ├── symboldata.h ├── symbolpin.cpp ├── symbolpin.h ├── symbolscanner.cpp └── symbolscanner.h ├── symbols ├── CMakeLists.txt ├── symboleditor.cpp ├── symboleditor.h ├── symboleditorscene.cpp ├── symboleditorscene.h ├── symboleditorwidget.cpp ├── symboleditorwidget.h └── symbols.pri ├── tech ├── gencmap.py ├── generate_schematic_symbols.py ├── ls1u.toml ├── ls1u.xml ├── mos.cmap ├── mos.dstyle ├── osu018 │ ├── SCN6M_SUBM.10.tech │ ├── osu018.magicrc │ ├── osu018.par │ ├── osu018.prm │ ├── osu018.sh │ ├── osu018_stdcells.gds │ ├── osu018_stdcells.lef │ ├── osu018_stdcells.lib │ ├── osu018_stdcells.slib │ ├── osu018_stdcells.sp │ ├── osu018_stdcells.v │ └── osu035_pads.gds2 ├── osu035 │ ├── SCN4M_SUBM.20.tech │ ├── osu035.magicrc │ ├── osu035.par │ ├── osu035.prm │ ├── osu035.sh │ ├── osu035_pads.gds2 │ ├── osu035_stdcells.gds2 │ ├── osu035_stdcells.lef │ ├── osu035_stdcells.lib │ ├── osu035_stdcells.slib │ ├── osu035_stdcells.sp │ └── osu035_stdcells.v ├── osu050 │ ├── SCN3ME_SUBM.30.tech │ ├── osu050.magicrc │ ├── osu050.par │ ├── osu050.prm │ ├── osu050.sh │ ├── osu050_stdcells.lef │ ├── osu050_stdcells.sp │ ├── osu05_stdcells.lib │ └── osu05_stdcells.v ├── process.xml ├── scmos.par ├── scmos.tech ├── sxlib │ ├── sxlib.alliance.lib │ ├── sxlib.lef │ ├── sxlib.lib │ └── sxlib.slib └── tech.qrc ├── tech_reader ├── CMakeLists.txt ├── tech_parser.yy ├── tech_reader.pri ├── tech_scanner.ll ├── techdata.cpp ├── techdata.h ├── techdesignrule.cpp ├── techdesignrule.h ├── techdesignrulespacing.cpp ├── techdesignrulespacing.h ├── techscanner.cpp └── techscanner.h ├── test_project ├── qtflow_test.pro └── source │ ├── counter.sch │ ├── counter.v │ └── counter_test.v ├── tests └── layout1.mag ├── vcd ├── CMakeLists.txt ├── vcd.pri ├── vcdparse.hpp ├── vcdsignaltreeitem.cpp ├── vcdsignaltreeitem.h ├── vcdsignaltreemodel.cpp ├── vcdsignaltreemodel.h ├── vcdsignalview.cpp ├── vcdsignalview.h ├── vcdsignalviewtreeitem.cpp ├── vcdsignalviewtreeitem.h ├── vcdsignalviewtreemodel.cpp ├── vcdsignalviewtreemodel.h ├── vcdtreeitem.cpp ├── vcdtreeitem.h ├── vcdtreemodel.cpp ├── vcdtreemodel.h ├── vcdviewgraphicsitem.cpp ├── vcdviewgraphicsitem.h ├── vcdviewgraphicsitembus.cpp ├── vcdviewgraphicsitembus.h ├── vcdviewgraphicsitembussubsignal.cpp ├── vcdviewgraphicsitembussubsignal.h ├── vcdviewgraphicsitemsignal.cpp ├── vcdviewgraphicsitemsignal.h ├── vcdviewgraphicsitemtimescale.cpp └── vcdviewgraphicsitemtimescale.h └── vcd_reader ├── CMakeLists.txt ├── vcd_data.cpp ├── vcd_data.hpp ├── vcd_data_fwd.hpp ├── vcd_error.hpp ├── vcd_lexer.hpp ├── vcd_loader.cpp ├── vcd_loader.hpp ├── vcd_parser.yy ├── vcd_reader.pri └── vcd_scanner.ll /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | 3 | *.slo 4 | *.lo 5 | *.o 6 | *.a 7 | *.la 8 | *.lai 9 | *.so 10 | *.dll 11 | *.dylib 12 | *.pyc 13 | 14 | # Qt-es 15 | 16 | /.qmake.cache 17 | /.qmake.stash 18 | *.pro.user 19 | *.pro.user.* 20 | *.qbs.user 21 | *.qbs.user.* 22 | *.moc 23 | moc_*.cpp 24 | moc_*.h 25 | qrc_*.cpp 26 | ui_*.h 27 | Makefile* 28 | *build-* 29 | 30 | # QtCreator 31 | 32 | *.autosave 33 | 34 | # QtCtreator Qml 35 | *.qmlproject.user 36 | *.qmlproject.user.* 37 | 38 | # QtCtreator CMake 39 | CMakeLists.txt.user* 40 | 41 | # build 42 | build/ 43 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "PythonQt"] 2 | path = PythonQt 3 | url = https://github.com/leviathanch/PythonQt.git 4 | #url = git@github.com:leviathanch/PythonQt.git 5 | -------------------------------------------------------------------------------- /QtFlow/buildflow.cpp: -------------------------------------------------------------------------------- 1 | #include "buildflow.h" 2 | 3 | BuildFlow::BuildFlow(QWidget *parent) : 4 | QDialog(parent), 5 | ui(new Ui::BuildFlow), 6 | project(NULL) 7 | { 8 | ui->setupUi(this); 9 | connect(ui->buttonBox,SIGNAL(accepted()),this,SLOT(on_buttonBox_accepted())); 10 | } 11 | 12 | void BuildFlow::setProject(Project* p) 13 | { 14 | project = p; 15 | if(project) displayBuildSteps(); 16 | } 17 | 18 | void BuildFlow::displayBuildSteps() 19 | { 20 | } 21 | 22 | void BuildFlow::on_buttonBox_accepted() 23 | { 24 | close(); 25 | } 26 | 27 | void BuildFlow::on_buttonBox_rejected() 28 | { 29 | close(); 30 | } 31 | -------------------------------------------------------------------------------- /QtFlow/buildflow.h: -------------------------------------------------------------------------------- 1 | #ifndef BUILDFLOW_H 2 | #define BUILDFLOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include "ui_buildflow.h" 16 | 17 | #include "project.h" 18 | 19 | class BuildFlow : public QDialog 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | explicit BuildFlow(QWidget *parent = nullptr); 25 | void setProject(Project*p); 26 | 27 | protected: 28 | void displayBuildSteps(); 29 | 30 | private slots: 31 | void on_buttonBox_rejected(); 32 | void on_buttonBox_accepted(); 33 | 34 | private: 35 | Ui::BuildFlow *ui; 36 | Project *project; 37 | }; 38 | 39 | #endif // BUILDFLOW_H 40 | -------------------------------------------------------------------------------- /QtFlow/console.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | PythonConsole 4 | 5 | 6 | 7 | 0 8 | 0 9 | 798 10 | 271 11 | 12 | 13 | 14 | &Python Console 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /QtFlow/editortabmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITORTABMANAGER_H 2 | #define EDITORTABMANAGER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "qeditor/generictexteditorwidget.h" 9 | #include "qeditor/codeeditorwidget.h" 10 | #include "schematics/schematicseditorwidget.h" 11 | #include "magic/magiclayouteditorwidget.h" 12 | #include "def/deflayouteditorwidget.h" 13 | #include "symbols/symboleditorwidget.h" 14 | 15 | class EditorTabManager : public QTabWidget 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit EditorTabManager(QWidget *parent = nullptr); 20 | 21 | signals: 22 | void fileSaved(); 23 | 24 | public slots: 25 | void onContentChanged(); 26 | void onContentSaved(); 27 | 28 | void openFile(QString); 29 | void closeFile(int); 30 | 31 | private: 32 | bool isCode(QString); 33 | bool isSchematic(QString); 34 | bool isLayout(QString suffix); 35 | }; 36 | 37 | #endif // EDITORTABMANAGER_H 38 | -------------------------------------------------------------------------------- /QtFlow/files.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Files 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Fi&les 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /QtFlow/fileselector.h: -------------------------------------------------------------------------------- 1 | #ifndef FILESELECTOR_H 2 | #define FILESELECTOR_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "qtflowfilelist.h" 11 | 12 | #include "ui_files.h" 13 | 14 | #include "project.h" 15 | 16 | class FileSelector : public QDockWidget 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | FileSelector(QWidget *parent); 22 | 23 | void setProject(Project *p); 24 | 25 | public slots: 26 | void onContextMenu(const QPoint&); 27 | void onOpen(const QModelIndex&); 28 | void refresh(); 29 | 30 | signals: 31 | void openFile(QString); 32 | 33 | private: 34 | Ui::Files *ui; 35 | 36 | QtFlowFileList *filesystem; 37 | QMenu *context; 38 | 39 | Project *project; 40 | }; 41 | 42 | #endif // FILESELECTOR_H 43 | -------------------------------------------------------------------------------- /QtFlow/grid.h: -------------------------------------------------------------------------------- 1 | #ifndef GRID_H 2 | #define GRID_H 3 | 4 | #include 5 | #include 6 | 7 | typedef QVector rects_t; 8 | 9 | namespace Ui { 10 | class Grid; 11 | } 12 | 13 | class Grid : public QWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit Grid(QWidget *parent = 0); 19 | ~Grid(); 20 | 21 | void RenderRectangles(QString layer, rects_t rectangles); 22 | 23 | private: 24 | Ui::Grid *ui; 25 | QGraphicsScene *scene; 26 | QColor colorMat(QString m); 27 | }; 28 | 29 | #endif // GRID_H 30 | -------------------------------------------------------------------------------- /QtFlow/grid.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Grid 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1000 10 | 655 11 | 12 | 13 | 14 | Grid 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 0 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /QtFlow/librarysettings.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 562 10 | 379 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /QtFlow/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainapplication.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | MainApplication app(argc, argv); 6 | return app.exec(); 7 | } 8 | -------------------------------------------------------------------------------- /QtFlow/mainapplication.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINAPPLICATION_H 2 | #define MAINAPPLICATION_H 3 | 4 | #include 5 | #include 6 | 7 | #include "mainwindow.h" 8 | 9 | class MainApplication : public QApplication 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | MainApplication(int &argc, char **argv); 15 | int exec(); 16 | 17 | private: 18 | int runHeadless(); 19 | bool isValidTechnology(QString technology); 20 | bool isValidProcess(QString process); 21 | int handleExit(); 22 | 23 | MainWindow *w; 24 | QSettings *settings; 25 | Project *project; 26 | PythonQtObjectPtr mainContext; 27 | QCommandLineParser *parser; 28 | QDomDocument *settingsFileProcess; 29 | PythonQtScriptingConsole *console; 30 | }; 31 | 32 | #endif // MAINAPPLICATION_H 33 | -------------------------------------------------------------------------------- /QtFlow/modules.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Modules 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | &Modules 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /QtFlow/moduleselector.h: -------------------------------------------------------------------------------- 1 | #ifndef MODULESELECTOR_H 2 | #define MODULESELECTOR_H 3 | 4 | #include "ui_modules.h" 5 | #include "moduleslistmodel.h" 6 | #include "modulestreemodel.h" 7 | 8 | #include "project.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | class ModuleSelector : public QDockWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | ModuleSelector(QWidget *parent); 21 | void setProject(Project *project); 22 | 23 | signals: 24 | void topModuleChanged(); 25 | void setTopLevel(QString); 26 | void setTestBench(QString); 27 | 28 | public slots: 29 | void setTopModule_clicked(); 30 | void closeButton_clicked(); 31 | void onSetTopModule(bool); 32 | void onSetTestBench(bool); 33 | void onContextMenu(const QPoint&); 34 | void refresh(); 35 | 36 | private: 37 | Ui::Modules *ui; 38 | 39 | Project *project; 40 | 41 | ModulesListModel *moduleList; 42 | ModulesTreeModel *moduleTree; 43 | 44 | QMenu *context; 45 | QString sourcedir; 46 | 47 | QString testbench; 48 | QString toplevel; 49 | }; 50 | 51 | #endif // MODULESELECTOR_H 52 | -------------------------------------------------------------------------------- /QtFlow/moduleslistmodel.h: -------------------------------------------------------------------------------- 1 | #ifndef MODULESLISTMODEL_H 2 | #define MODULESLISTMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class ModulesListModel : public QAbstractListModel 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | ModulesListModel(QObject *parent, QString sourcedir); 13 | ~ModulesListModel(); 14 | 15 | int rowCount(const QModelIndex& = QModelIndex()) const override; 16 | QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const override; 17 | 18 | QString file(const QModelIndex& = QModelIndex()); 19 | 20 | void setTestBench(QString); 21 | void setTopLevel(QString); 22 | 23 | private: 24 | QList modules; 25 | QList files; 26 | QString sourcedir; 27 | QString toplevel; 28 | QString testbench; 29 | }; 30 | 31 | #endif // MODULESLISTMODEL_H 32 | -------------------------------------------------------------------------------- /QtFlow/new.h: -------------------------------------------------------------------------------- 1 | #ifndef NEW_H 2 | #define NEW_H 3 | 4 | #include 5 | #include 6 | 7 | #include "project.h" 8 | 9 | enum new_element_t 10 | { 11 | Verilog, 12 | VerilogTestbench, 13 | Schematics, 14 | Symbol, 15 | Magic 16 | }; 17 | 18 | namespace Ui { 19 | class New; 20 | } 21 | 22 | class New : public QDialog 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | explicit New(QWidget *parent = 0); 28 | ~New(); 29 | 30 | void setProject(Project *p); 31 | 32 | signals: 33 | void fileCreated(QString); 34 | 35 | private slots: 36 | void on_buttonBox_accepted(); 37 | 38 | private: 39 | QFileInfo createMagicFile(); 40 | QFileInfo createVerilogFile(); 41 | QFileInfo createSymbolFile(); 42 | 43 | Ui::New *ui; 44 | Project *project; 45 | }; 46 | 47 | #endif // NEW_H 48 | -------------------------------------------------------------------------------- /QtFlow/projects.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Projects 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Pro&ject 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /QtFlow/projectselector.h: -------------------------------------------------------------------------------- 1 | #ifndef PROJECTSELECTOR_H 2 | #define PROJECTSELECTOR_H 3 | 4 | #include 5 | #include 6 | 7 | #include "projectstreemodel.h" 8 | 9 | #include "ui_projects.h" 10 | 11 | #include "project.h" 12 | 13 | class ProjectSelector : public QDockWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | ProjectSelector(QWidget *parent); 19 | 20 | void setProject(Project*); 21 | 22 | signals: 23 | void openFile(QString); 24 | 25 | public slots: 26 | void refresh(); 27 | void onContextMenu(const QPoint&); 28 | void onOpen(const QModelIndex&); 29 | 30 | private: 31 | Ui::Projects *ui; 32 | 33 | Project *project; 34 | 35 | ProjectsTreeModel *projectMembers; 36 | QMenu *context; 37 | }; 38 | 39 | #endif // PROJECTSELECTOR_H 40 | -------------------------------------------------------------------------------- /QtFlow/projectsettings.h: -------------------------------------------------------------------------------- 1 | #ifndef PROJECTSETTINGS_H 2 | #define PROJECTSETTINGS_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include "ui_projectsettings.h" 16 | 17 | #include "project.h" 18 | 19 | class ProjectSettings : public QDialog 20 | { 21 | Q_OBJECT 22 | public: 23 | explicit ProjectSettings(QWidget *parent = nullptr); 24 | void setProject(Project*); 25 | void setSettings(QSettings*s); 26 | 27 | signals: 28 | 29 | public slots: 30 | void technologyActivated(); 31 | void processActivated(); 32 | void storeData(); 33 | 34 | void addDirectory(); 35 | void deleteDirectory(); 36 | 37 | private: 38 | void setSearchPathList(); 39 | void setSearchPathButtons(); 40 | void setupEverything(); 41 | 42 | Ui::ProjectSettings *ui; 43 | QSettings *settings; 44 | 45 | Project *project; 46 | QDomDocument *settingsFileProcess; 47 | }; 48 | 49 | #endif // PROJECTSETTINGS_H 50 | -------------------------------------------------------------------------------- /QtFlow/projectsitem.h: -------------------------------------------------------------------------------- 1 | #ifndef PROJECTSITEM_H 2 | #define PROJECTSITEM_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class ProjectsItem 9 | { 10 | public: 11 | explicit ProjectsItem(QString name, ProjectsItem *parentItem = 0); 12 | ~ProjectsItem(); 13 | 14 | void appendChild(ProjectsItem *child); 15 | 16 | void setFileData(const QFileInfo &file); 17 | QFileInfo fileData() const; 18 | 19 | ProjectsItem *child(int row); 20 | int childCount() const; 21 | int columnCount() const; 22 | QVariant data(int column) const; 23 | int row() const; 24 | ProjectsItem *parentItem(); 25 | bool removeChildren(int position, int count); 26 | 27 | private: 28 | QFileInfo m_fileInfoData; 29 | 30 | ProjectsItem* m_parentItem; 31 | QVector m_itemData; 32 | QList m_childItems; 33 | }; 34 | 35 | #endif // PROJECTSITEM_H 36 | -------------------------------------------------------------------------------- /QtFlow/pysettings.cpp: -------------------------------------------------------------------------------- 1 | #include "pysettings.h" 2 | 3 | PySettings::PySettings(QObject *parent, QSettings *s) : 4 | QObject(parent), 5 | settings(s) 6 | { 7 | } 8 | 9 | QString PySettings::getIcarus() 10 | { 11 | QString r; 12 | if(settings) r = settings->value("icarus").toString(); 13 | return r; 14 | } 15 | 16 | QString PySettings::getYosys() 17 | { 18 | QString r; 19 | if(settings) r = settings->value("yosys").toString(); 20 | return r; 21 | } 22 | 23 | QString PySettings::getYosysABC() 24 | { 25 | QString r; 26 | if(settings) r = settings->value("yosys-abc").toString(); 27 | return r; 28 | } 29 | 30 | QString PySettings::getGrayWolf() 31 | { 32 | QString r; 33 | if(settings) r = settings->value("graywolf").toString(); 34 | return r; 35 | } 36 | 37 | QString PySettings::getQRouter() 38 | { 39 | QString r; 40 | if(settings) r = settings->value("qrouter").toString(); 41 | return r; 42 | } 43 | 44 | PyObject* PySettings::getMainModule() 45 | { 46 | return PythonQt::self()->getMainModule(); 47 | } 48 | -------------------------------------------------------------------------------- /QtFlow/pysettings.h: -------------------------------------------------------------------------------- 1 | #ifndef PYSETTINGS_H 2 | #define PYSETTINGS_H 3 | 4 | #include "PythonQt.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | class PySettings : public QObject 15 | { 16 | Q_OBJECT 17 | public: 18 | explicit PySettings(QObject *parent = nullptr, QSettings *s = nullptr); 19 | 20 | public Q_SLOTS: 21 | PyObject* getMainModule(); 22 | 23 | QString getIcarus(); 24 | QString getYosys(); 25 | QString getYosysABC(); 26 | QString getGrayWolf(); 27 | QString getQRouter(); 28 | 29 | private: 30 | QSettings *settings; 31 | }; 32 | 33 | #endif // PYSETTINGS_H 34 | -------------------------------------------------------------------------------- /QtFlow/pythonconsoledockwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "pythonconsoledockwidget.h" 2 | 3 | PythonConsoleDockWidget::PythonConsoleDockWidget(QWidget *parent, PythonQtObjectPtr context) : 4 | QDockWidget(parent), 5 | ui(new Ui::PythonConsole), 6 | mainContext(context) 7 | { 8 | ui->setupUi(this); 9 | console = new PythonQtScriptingConsole(ui->dockWidgetContents, mainContext); 10 | ui->dockWidgetContents->layout()->addWidget(console); 11 | console->showMaximized(); 12 | } 13 | -------------------------------------------------------------------------------- /QtFlow/pythonconsoledockwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONCONSOLEDOCKWIDGET_H 2 | #define PYTHONCONSOLEDOCKWIDGET_H 3 | 4 | #include 5 | #include "ui_console.h" 6 | #include "gui/PythonQtScriptingConsole.h" 7 | 8 | class PythonConsoleDockWidget : public QDockWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit PythonConsoleDockWidget(QWidget *parent = nullptr, PythonQtObjectPtr context = nullptr); 13 | 14 | signals: 15 | 16 | public slots: 17 | private: 18 | PythonQtScriptingConsole *console; 19 | PythonQtObjectPtr mainContext; 20 | Ui::PythonConsole *ui; 21 | }; 22 | 23 | #endif // PYTHONCONSOLEDOCKWIDGET_H 24 | -------------------------------------------------------------------------------- /QtFlow/qtflow.linux.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | graywolf=/usr/bin/graywolf 3 | icarus=/usr/bin/iverilog 4 | qrouter=/usr/bin/qrouter 5 | tech_path=/usr/share/qtflow 6 | yosys=/usr/bin/yosys 7 | yosys-abc=/usr/bin/yosys-abc 8 | -------------------------------------------------------------------------------- /QtFlow/qtflow.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ./qtflow.linux.ini 4 | 5 | 6 | -------------------------------------------------------------------------------- /QtFlow/qtflowfilelist.h: -------------------------------------------------------------------------------- 1 | #ifndef QTFLOWFILELIST_H 2 | #define QTFLOWFILELIST_H 3 | 4 | #include 5 | #include 6 | 7 | #include "project.h" 8 | 9 | class QtFlowFileList : public QFileSystemModel 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | QtFlowFileList(QObject *parent = Q_NULLPTR, Project *p = Q_NULLPTR); 15 | void setProject(Project*); 16 | 17 | void refresh(); 18 | 19 | private: 20 | QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const override; 21 | 22 | QMap mapFileModule; 23 | 24 | Project *project; 25 | }; 26 | 27 | #endif // QTFLOWFILELIST_H 28 | -------------------------------------------------------------------------------- /QtFlow/qtreeviewdragdrop.cpp: -------------------------------------------------------------------------------- 1 | #include "qtreeviewdragdrop.h" 2 | 3 | QTreeViewDragDrop::QTreeViewDragDrop(QWidget *parent) 4 | : QTreeView(parent) 5 | { 6 | 7 | } 8 | 9 | void QTreeViewDragDrop::dragEnterEvent(QDragEnterEvent *event) 10 | { 11 | event->acceptProposedAction(); 12 | } 13 | -------------------------------------------------------------------------------- /QtFlow/qtreeviewdragdrop.h: -------------------------------------------------------------------------------- 1 | #ifndef QTREEVIEWDRAGDROP_H 2 | #define QTREEVIEWDRAGDROP_H 3 | 4 | #include 5 | #include 6 | 7 | class QTreeViewDragDrop : public QTreeView 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit QTreeViewDragDrop(QWidget *parent = nullptr); 12 | 13 | signals: 14 | 15 | public slots: 16 | void dragEnterEvent(QDragEnterEvent *event); 17 | 18 | }; 19 | 20 | #endif // QTREEVIEWDRAGDROP_H 21 | -------------------------------------------------------------------------------- /QtFlow/savechanges.cpp: -------------------------------------------------------------------------------- 1 | #include "savechanges.h" 2 | #include "ui_savechanges.h" 3 | 4 | #include 5 | #include 6 | 7 | SaveChanges::SaveChanges(QWidget *parent, int i, QString path) : 8 | QDialog(parent), 9 | ui(new Ui::SaveChanges), 10 | index(i) 11 | { 12 | ui->setupUi(this); 13 | 14 | QFileInfo info(path); 15 | if (path != "") 16 | ui->label->setText(QString("Save changes to %1?").arg(info.fileName())); 17 | else 18 | ui->label->setText(QString("Save changes?")); 19 | } 20 | 21 | SaveChanges::~SaveChanges() 22 | { 23 | delete ui; 24 | } 25 | 26 | void SaveChanges::on_buttonBox_rejected() 27 | { 28 | emit rejected(); 29 | } 30 | 31 | void SaveChanges::on_buttonBox_accepted() 32 | { 33 | emit accepted(index); 34 | } 35 | -------------------------------------------------------------------------------- /QtFlow/savechanges.h: -------------------------------------------------------------------------------- 1 | #ifndef SAVECHANGES_H 2 | #define SAVECHANGES_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class SaveChanges; 9 | } 10 | 11 | class SaveChanges : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit SaveChanges(QWidget *parent = 0, int i = 0, QString path = ""); 17 | ~SaveChanges(); 18 | 19 | signals: 20 | void accepted(int); 21 | void rejected(); 22 | 23 | private slots: 24 | void on_buttonBox_rejected(); 25 | 26 | void on_buttonBox_accepted(); 27 | 28 | private: 29 | Ui::SaveChanges *ui; 30 | 31 | int index; 32 | }; 33 | 34 | #endif // SAVECHANGES_H 35 | -------------------------------------------------------------------------------- /QtFlow/specialnets.h: -------------------------------------------------------------------------------- 1 | #ifndef SPECIALNETS_H 2 | #define SPECIALNETS_H 3 | 4 | #include 5 | #include 6 | 7 | #include "project.h" 8 | 9 | #include "ui_specialnets.h" 10 | 11 | class SpecialNets : public QDialog 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit SpecialNets(QWidget *parent = nullptr); 16 | void setProject(Project *p); 17 | 18 | protected: 19 | void refreshTables(); 20 | 21 | signals: 22 | 23 | public slots: 24 | void on_buttonBox_accepted(); 25 | 26 | private: 27 | Project *project; 28 | Ui::SpecialNets *ui; 29 | }; 30 | 31 | #endif // SPECIALNETS_H 32 | -------------------------------------------------------------------------------- /QtFlow/templates.h: -------------------------------------------------------------------------------- 1 | #ifndef TEMPLATES_H 2 | #define TEMPLATES_H 3 | 4 | #include "project.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | 12 | namespace Ui { 13 | class Templates; 14 | } 15 | 16 | class Templates : public QDialog 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit Templates(QWidget *parent = 0, QSettings *settings = 0, PythonQtObjectPtr main = 0); 22 | ~Templates(); 23 | 24 | private slots: 25 | void on_buttonBox_accepted(); 26 | void on_comboTechnology_activated(int); 27 | void on_pushPath_clicked(); 28 | void on_listWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *b); 29 | 30 | signals: 31 | void projectCreated(QString); 32 | 33 | private: 34 | Ui::Templates *ui; 35 | Project *project; 36 | QSettings *settings; 37 | PythonQtObjectPtr mainContext; 38 | QDomDocument *settingsFileProcess; 39 | }; 40 | 41 | #endif // TEMPLATES_H 42 | -------------------------------------------------------------------------------- /QtFlow/wave.h: -------------------------------------------------------------------------------- 1 | #ifndef WAVE_H 2 | #define WAVE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "qtreeviewdragdrop.h" 14 | 15 | #include "ui_wave.h" 16 | 17 | #include "vcd/vcdtreemodel.h" 18 | #include "vcd/vcdsignaltreemodel.h" 19 | #include "vcd/vcdsignalviewtreemodel.h" 20 | #include "vcd/vcdsignalview.h" 21 | 22 | //#include "vcd_parser/location.hh" 23 | #include "vcd_reader/vcd_loader.hpp" 24 | 25 | namespace Ui { 26 | class Wave; 27 | } 28 | 29 | class Wave : public QDockWidget 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | explicit Wave(QWidget *parent = 0); 35 | ~Wave(); 36 | 37 | void loadVcd(QString); 38 | 39 | public slots: 40 | void onSelectScope(QModelIndex); 41 | void onSelectSignal(QModelIndex); 42 | 43 | private: 44 | Ui::Wave *ui; 45 | VcdTreeModel *tree; 46 | VcdSignalTreeModel *signalTree; 47 | VcdSignalView *signalView; 48 | QTreeViewDragDrop *treeSelectionView; 49 | 50 | vcd::VcdData vcd_data; 51 | }; 52 | 53 | #endif // WAVE_H 54 | -------------------------------------------------------------------------------- /QtFlow/welcome.cpp: -------------------------------------------------------------------------------- 1 | #include "welcome.h" 2 | #include "ui_welcome.h" 3 | 4 | Welcome::Welcome(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::Welcome) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | Welcome::~Welcome() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /QtFlow/welcome.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWELCOME_H 2 | #define MAINWELCOME_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class Welcome; 8 | } 9 | 10 | class Welcome : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Welcome(QWidget *parent = 0); 16 | ~Welcome(); 17 | 18 | private: 19 | Ui::Welcome *ui; 20 | }; 21 | 22 | #endif // MAINWELCOME_H 23 | -------------------------------------------------------------------------------- /QtFlow/welcome.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Welcome 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /blif/blif.pri: -------------------------------------------------------------------------------- 1 | PARSE_OUT_PWD = $$OUT_PWD/blif 2 | 3 | # This was needed to work around "number of sections exceeded object file format limit" linker error 4 | win32:QMAKE_CXXFLAGS += /bigobj 5 | 6 | SOURCES += \ 7 | $$PWD/blifdata.cpp \ 8 | $$PWD/blifdatacomponentinfo.cpp 9 | 10 | HEADERS += \ 11 | $$PWD/blifdata.h \ 12 | $$PWD/blifdatacomponentinfo.h 13 | -------------------------------------------------------------------------------- /blif/blifdata.h: -------------------------------------------------------------------------------- 1 | #ifndef SBLIFDATA_H 2 | #define SBLIFDATA_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "blifdatacomponentinfo.h" 18 | 19 | namespace blif { 20 | enum blif_keyword { 21 | MODEL, 22 | INPUTS, 23 | OUTPUTS, 24 | NAMES, 25 | GATE, 26 | SUB_COMPONENT, 27 | END, 28 | UNKNOWN 29 | }; 30 | 31 | class BLIFData 32 | { 33 | public: 34 | BLIFData(QString file); 35 | 36 | QVector getComponents(); 37 | QStringList getPadPinsInput(); 38 | QStringList getPadPinsOutput(); 39 | 40 | protected: 41 | blif_keyword tokenize(QString s); 42 | 43 | void registerInputPins(QStringList lineList); 44 | void registerOutputPins(QStringList lineList); 45 | void registerComponent(QStringList lineList); 46 | 47 | private: 48 | QString streamname; 49 | 50 | QString m_modelName; 51 | 52 | QStringList m_inputList; 53 | QStringList m_outputList; 54 | 55 | QVector m_components; 56 | 57 | }; 58 | } 59 | 60 | #endif // SBLIFDATA_H 61 | -------------------------------------------------------------------------------- /blif/blifdatacomponentinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "blifdatacomponentinfo.h" 2 | 3 | BLIFDataComponentInfo::BLIFDataComponentInfo() 4 | { 5 | 6 | } 7 | 8 | void BLIFDataComponentInfo::setName(QString s) 9 | { 10 | m_name = s; 11 | } 12 | 13 | QString BLIFDataComponentInfo::getName() 14 | { 15 | return m_name; 16 | } 17 | 18 | QStringList BLIFDataComponentInfo::getPins() 19 | { 20 | return m_signalMapping.keys(); 21 | } 22 | 23 | QString BLIFDataComponentInfo::getSignal(QString s) 24 | { 25 | return m_signalMapping[s]; 26 | } 27 | 28 | void BLIFDataComponentInfo::setSignalMapping(QString s) 29 | { 30 | QString pin; 31 | QString signal; 32 | QStringList sigMapping = s.split('='); 33 | if(sigMapping.count()>1) { 34 | pin = sigMapping[0]; 35 | signal = sigMapping[1]; 36 | signal.remove('\\'); 37 | m_signalMapping[pin]=signal; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /blif/blifdatacomponentinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef BLIFDATACOMPONENTINFO_H 2 | #define BLIFDATACOMPONENTINFO_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class BLIFDataComponentInfo 9 | { 10 | public: 11 | BLIFDataComponentInfo(); 12 | void setName(QString s); 13 | void setSignalMapping(QString s); 14 | QString getName(); 15 | QStringList getPins(); 16 | QString getSignal(QString s); 17 | 18 | private: 19 | QString m_name; 20 | QMap m_signalMapping; 21 | }; 22 | 23 | #endif // BLIFDATACOMPONENTINFO_H 24 | -------------------------------------------------------------------------------- /cmap_reader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "ColorMapReader") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | colormap.cpp 14 | ) 15 | 16 | add_library(${TARGET} SHARED 17 | ${SOURCES} 18 | ) 19 | 20 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 21 | 22 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 23 | 24 | -------------------------------------------------------------------------------- /cmap_reader/cmap_reader.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | SOURCES += \ 5 | $$PWD/colormap.cpp 6 | 7 | HEADERS += \ 8 | $$PWD/colormap.h 9 | 10 | -------------------------------------------------------------------------------- /contacts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "Contact") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | contactplacement.cpp 14 | contactsview.cpp 15 | padinfo.cpp 16 | ) 17 | 18 | set(UI_SOURCES 19 | contactplacement.ui 20 | ) 21 | 22 | qt5_wrap_ui(UI_GENERATED_HEADERS ${UI_SOURCES}) 23 | 24 | add_library(${TARGET} SHARED 25 | ${SOURCES} 26 | ${UI_GENERATED_HEADERS} 27 | ) 28 | 29 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 30 | 31 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 32 | 33 | -------------------------------------------------------------------------------- /contacts/contacts.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | SOURCES += \ 5 | $$PWD/contactplacement.cpp \ 6 | $$PWD/contactsview.cpp \ 7 | $$PWD/padinfo.cpp 8 | 9 | HEADERS += \ 10 | $$PWD/contactplacement.h \ 11 | $$PWD/contactsview.h \ 12 | $$PWD/padinfo.h 13 | 14 | FORMS += \ 15 | $$PWD/contactplacement.ui 16 | -------------------------------------------------------------------------------- /contacts/contactsview.cpp: -------------------------------------------------------------------------------- 1 | #include "contactsview.h" 2 | 3 | ContactsView::ContactsView(QWidget *parent) : 4 | QGraphicsView(parent) 5 | { 6 | 7 | } 8 | 9 | void ContactsView::wheelEvent(QWheelEvent *event) 10 | { 11 | qreal factor = pow(1.01, event->delta()); 12 | scale(factor, factor); 13 | } 14 | -------------------------------------------------------------------------------- /contacts/contactsview.h: -------------------------------------------------------------------------------- 1 | #ifndef CONTACTSVIEW_H 2 | #define CONTACTSVIEW_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | class ContactsView : public QGraphicsView 10 | { 11 | public: 12 | ContactsView(QWidget *parent = Q_NULLPTR); 13 | public slots: 14 | void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; 15 | }; 16 | 17 | #endif // CONTACTSVIEW_H 18 | -------------------------------------------------------------------------------- /contacts/padinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef PADINFO_H 2 | #define PADINFO_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class PadInfo 12 | { 13 | public: 14 | PadInfo(QString padpath); 15 | void setPadCell(QString pad, QString cell); 16 | void setPadName(QString pad, QString name); 17 | void setPadPinSignal(QString pad, QString pin, QString signal); 18 | void setSideLength(qreal); 19 | void sync(); 20 | 21 | QStringList getPadList(); 22 | QString getPadCell(QString pad); 23 | QString getPadName(QString pad); 24 | QString getPadPinSignal(QString pad, QString pin); 25 | qreal getSideLength(); 26 | 27 | private: 28 | QMap m_sides; 29 | QMap m_padCellMapping; 30 | QMap m_padNameMapping; 31 | QMap> m_padPinSignalMapping; 32 | QString m_filePath; 33 | qreal m_sideLength; 34 | }; 35 | 36 | #endif // PADINFO_H 37 | -------------------------------------------------------------------------------- /def/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "DEF") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | BISON_TARGET(DEFParser def_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/def_parser.cpp) 7 | FLEX_TARGET(DEFScanner def_scanner.ll ${CMAKE_CURRENT_BINARY_DIR}/def_scanner.cpp) 8 | ADD_FLEX_BISON_DEPENDENCY(DEFScanner DEFParser) 9 | 10 | include_directories( 11 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | "${CMAKE_CURRENT_BINARY_DIR}/../qlayout" 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ) 16 | 17 | set(SOURCES 18 | defdata.cpp 19 | defdatapin.cpp 20 | deflayouteditor.cpp 21 | deflayouteditorwidget.cpp 22 | defmoduleinfo.cpp 23 | defrouteinfo.cpp 24 | defscanner.cpp 25 | ) 26 | 27 | add_library(${TARGET} SHARED 28 | ${BISON_DEFParser_OUTPUTS} 29 | ${FLEX_DEFScanner_OUTPUTS} 30 | ${SOURCES} 31 | ) 32 | 33 | target_link_libraries(${TARGET} 34 | ${QT5_LIBRARIES} 35 | QEditor 36 | QLayout 37 | ) 38 | 39 | if(BUILD_STAND_ALONE_BINARIES) 40 | QT5_ADD_RESOURCES(ICONS ${PROJECT_SOURCE_DIR}/icons/icons.qrc) 41 | add_executable(def_editor def_editor.cpp def_editor_app.cpp ${ICONS}) 42 | target_link_libraries(def_editor ${QT5_LIBRARIES} QEditor DEF QLayout TechReader) 43 | endif(BUILD_STAND_ALONE_BINARIES) 44 | 45 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 46 | 47 | -------------------------------------------------------------------------------- /def/def_editor.cpp: -------------------------------------------------------------------------------- 1 | #include "def_editor_app.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | DefEditor app(argc, argv); 6 | return app.exec(); 7 | } 8 | -------------------------------------------------------------------------------- /def/def_editor_app.cpp: -------------------------------------------------------------------------------- 1 | #include "def_editor_app.h" 2 | 3 | DefEditor::DefEditor(int &argc, char **argv) : 4 | QApplication(argc,argv), 5 | parser(new QCommandLineParser) 6 | { 7 | parser->setApplicationDescription("QtFlow: Qt5 based synthesis tool"); 8 | parser->addHelpOption(); 9 | parser->addVersionOption(); 10 | parser->addOption(QCommandLineOption(QStringList() << "f" << "file", QCoreApplication::translate("main", "File to open"),"1")); 11 | parser->addOption(QCommandLineOption(QStringList() << "l" << "lef", QCoreApplication::translate("main", "LEF file"),"1")); 12 | parser->process(*this); 13 | } 14 | 15 | int DefEditor::exec() 16 | { 17 | QString filePath; 18 | DEFLayoutEditorWidget w; 19 | if(parser->isSet("file")) { 20 | filePath = parser->value("file"); 21 | qDebug() << "Opening DEF file " << filePath; 22 | w.show(); 23 | if(parser->isSet("lef")) { 24 | w.loadLEF(parser->value("lef")); 25 | } 26 | w.loadFile(filePath); 27 | return QApplication::exec(); 28 | } else { 29 | qDebug() << "No DEF file specified. Doing nothing"; 30 | return 0; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /def/def_editor_app.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "deflayouteditorwidget.h" 5 | 6 | class DefEditor : public QApplication { 7 | Q_OBJECT 8 | 9 | QCommandLineParser *parser; 10 | public: 11 | DefEditor(int &argc, char **argv); 12 | int exec(); 13 | }; 14 | -------------------------------------------------------------------------------- /def/defdatapin.cpp: -------------------------------------------------------------------------------- 1 | #include "defdatapin.h" 2 | 3 | namespace def { 4 | DEFDataPin::DEFDataPin() 5 | { 6 | 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /def/defdatapin.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFDATAPIN_H 2 | #define DEFDATAPIN_H 3 | 4 | #include 5 | 6 | namespace def { 7 | class DEFDataPin 8 | { 9 | public: 10 | DEFDataPin(); 11 | QString m_name; 12 | QString m_signal; 13 | QString m_layer; 14 | qreal m_x, m_y; 15 | qreal m_w, m_h; 16 | }; 17 | } 18 | 19 | #endif // DEFDATAPIN_H 20 | -------------------------------------------------------------------------------- /def/deflayouteditor.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFLAYOUTEDITOR_H 2 | #define DEFLAYOUTEDITOR_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "qlayout/qlayoutscene.h" 13 | #include "qlayout/layoutvisibles.h" 14 | #include "defdata.h" 15 | 16 | #include "qlayout/genericlayouteditor.h" 17 | 18 | namespace def { 19 | class DEFData; 20 | } 21 | 22 | class DEFLayoutEditor : public GenericLayoutEditor 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | explicit DEFLayoutEditor(QWidget *parent = nullptr); 28 | 29 | void loadFile(QString); 30 | void saveFile(); 31 | 32 | private: 33 | void addMacroInstances(); 34 | void addContactPins(); 35 | void addRectangles(); 36 | void addSignalWires(); 37 | 38 | def::DEFData *defdata; 39 | }; 40 | 41 | #endif // DEFLAYOUTEDITOR_H 42 | -------------------------------------------------------------------------------- /def/deflayouteditorwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "deflayouteditorwidget.h" 2 | 3 | DEFLayoutEditorWidget::DEFLayoutEditorWidget(QWidget *parent) : 4 | GenericLayoutEditorWidget(parent) 5 | { 6 | QAction *button; 7 | setType(DEFLayoutEditorWidgetType); 8 | 9 | // setting up all the tool bar content 10 | setUpCentralWidget(new DEFLayoutEditor(this)); 11 | 12 | //button = addToolbarAction(QPixmap(":/icon_3d.svg"), "3D view"); 13 | //connect(button, SIGNAL(triggered(bool)), this, SLOT(show3D())); 14 | } 15 | -------------------------------------------------------------------------------- /def/deflayouteditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFLAYOUTEDITORWIDGET_H 2 | #define DEFLAYOUTEDITORWIDGET_H 3 | 4 | #include "deflayouteditor.h" 5 | #include "qlayout/genericlayouteditorwidget.h" 6 | 7 | class DEFLayoutEditorWidget : public GenericLayoutEditorWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | DEFLayoutEditorWidget(QWidget *parent = nullptr); 12 | }; 13 | 14 | #endif // DEFLAYOUTEDITORWIDGET_H 15 | -------------------------------------------------------------------------------- /def/defmoduleinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "defmoduleinfo.h" 2 | 3 | namespace def { 4 | DEFModuleInfo::DEFModuleInfo() {} 5 | } 6 | -------------------------------------------------------------------------------- /def/defmoduleinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFMODULEINFO_H 2 | #define DEFMODULEINFO_H 3 | 4 | #include 5 | 6 | namespace def { 7 | class DEFModuleInfo { 8 | public: 9 | DEFModuleInfo(); 10 | QString macro_name; 11 | QString instance_name; 12 | QString orient; 13 | double x, y; 14 | }; 15 | } 16 | 17 | #endif // DEFMODULEINFO_H 18 | -------------------------------------------------------------------------------- /def/defrouteinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "defrouteinfo.h" 2 | 3 | DEFRouteInfo::DEFRouteInfo() 4 | { 5 | 6 | } 7 | 8 | void DEFRouteInfo::addPoint(qreal x, qreal y) 9 | { 10 | m_pointList.append(QPointF(x,y)); 11 | } 12 | 13 | void DEFRouteInfo::setLayer(QString s) 14 | { 15 | m_layer = s; 16 | } 17 | 18 | QVector DEFRouteInfo::getPoints() 19 | { 20 | return m_pointList; 21 | } 22 | 23 | QString DEFRouteInfo::getLayer() 24 | { 25 | return m_layer; 26 | } 27 | 28 | void DEFRouteInfo::setVia(QString s) 29 | { 30 | m_viaName = s; 31 | } 32 | 33 | QString DEFRouteInfo::getViaName() 34 | { 35 | return m_viaName; 36 | } 37 | -------------------------------------------------------------------------------- /def/defrouteinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFROUTEINFO_H 2 | #define DEFROUTEINFO_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class DEFRouteInfo 9 | { 10 | public: 11 | DEFRouteInfo(); 12 | void addPoint(qreal x, qreal y); 13 | void setLayer(QString s); 14 | void setVia(QString s); 15 | 16 | QVector getPoints(); 17 | QString getLayer(); 18 | QString getViaName(); 19 | 20 | private: 21 | QVector m_pointList; 22 | QString m_layer; 23 | QString m_viaName; 24 | }; 25 | 26 | #endif // DEFROUTEINFO_H 27 | -------------------------------------------------------------------------------- /def/defscanner.cpp: -------------------------------------------------------------------------------- 1 | #include "defscanner.h" 2 | 3 | namespace def { 4 | DEFScanner::DEFScanner(std::istream* in, std::ostream* out) : 5 | defFlexLexer(in, out) 6 | { 7 | 8 | } 9 | } 10 | 11 | int defFlexLexer::yywrap() 12 | { 13 | return 1; 14 | } 15 | 16 | int defFlexLexer::yylex() 17 | { 18 | std::cerr << "in vcdFlexLexer::yylex() !" << std::endl; 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /def/defscanner.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFSCANNER_H 2 | #define DEFSCANNER_H 3 | 4 | #ifndef __FLEX_LEXER_H 5 | #define yyFlexLexer defFlexLexer 6 | #include 7 | #undef yyFlexLexer 8 | #endif 9 | 10 | #include "def_parser.hpp" 11 | 12 | namespace def { 13 | class DEFScanner : public defFlexLexer 14 | { 15 | public: 16 | DEFScanner(std::istream* in = 0, std::ostream* out = &std::cout); 17 | int deflex(DEFParser::semantic_type*, DEFData*); 18 | }; 19 | } 20 | 21 | #endif // DEFSCANNER_H 22 | -------------------------------------------------------------------------------- /gds2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "GDS") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | ${CMAKE_CURRENT_SOURCE_DIR} 8 | ${CMAKE_CURRENT_BINARY_DIR} 9 | ) 10 | 11 | set(SOURCES 12 | gdsboundary.cpp 13 | gdscell.cpp 14 | gdsfile.cpp 15 | gdspoint.cpp 16 | gdtdata.cpp 17 | ) 18 | 19 | add_library(${TARGET} SHARED 20 | ${SOURCES} 21 | ) 22 | 23 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 24 | 25 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 26 | 27 | -------------------------------------------------------------------------------- /gds2/gds2.pri: -------------------------------------------------------------------------------- 1 | HEADERS += \ 2 | $$PWD/gdsfile.h \ 3 | $$PWD/kvstypes.h \ 4 | $$PWD/gdtdata.h \ 5 | $$PWD/gdscell.h \ 6 | $$PWD/gdsboundary.h \ 7 | $$PWD/gdspoint.h 8 | 9 | SOURCES += \ 10 | $$PWD/gdsfile.cpp \ 11 | $$PWD/gdtdata.cpp \ 12 | $$PWD/gdscell.cpp \ 13 | $$PWD/gdsboundary.cpp \ 14 | $$PWD/gdspoint.cpp 15 | -------------------------------------------------------------------------------- /gds2/gdsboundary.h: -------------------------------------------------------------------------------- 1 | #ifndef GDSBOUNDARY_H 2 | #define GDSBOUNDARY_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "gdspoint.h" 10 | 11 | class GDSBoundary 12 | { 13 | public: 14 | GDSBoundary(int i); 15 | void addPoint(int x, int y); 16 | int getLayerIndex(); 17 | QPolygonF getPolygon(); 18 | 19 | void setScale(qreal x, qreal y); 20 | void setOffset(qreal x, qreal y); 21 | 22 | qreal x(); 23 | qreal y(); 24 | qreal width(); 25 | qreal height(); 26 | 27 | private: 28 | QVector m_points; 29 | int m_layer; 30 | 31 | qreal m_scale_x; 32 | qreal m_scale_y; 33 | 34 | qreal m_offset_x; 35 | qreal m_offset_y; 36 | }; 37 | 38 | #endif // GDSBOUNDARY_H 39 | -------------------------------------------------------------------------------- /gds2/gdscell.h: -------------------------------------------------------------------------------- 1 | #ifndef GDSCELL_H 2 | #define GDSCELL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "gdsboundary.h" 10 | 11 | //#include "qlayout/qlayoutmacroitem.h" 12 | 13 | typedef QVector path_t; 14 | 15 | class GDSCell 16 | { 17 | public: 18 | GDSCell(QString name); 19 | void addBoundary(GDSBoundary* b); 20 | QString getName(); 21 | QVector getBoundaries(); 22 | 23 | qreal getWidth(); 24 | qreal getHeight(); 25 | 26 | void setRectangle(qreal x, qreal y, qreal w, qreal h); 27 | 28 | private: 29 | QVector m_boundaries; 30 | QString m_name; 31 | qreal m_x1; 32 | qreal m_y1; 33 | qreal m_x2; 34 | qreal m_y2; 35 | 36 | qreal m_scale; 37 | 38 | qreal m_offset_x; 39 | qreal m_offset_y; 40 | }; 41 | 42 | #endif // GDSCELL_H 43 | -------------------------------------------------------------------------------- /gds2/gdspoint.cpp: -------------------------------------------------------------------------------- 1 | #include "gdspoint.h" 2 | 3 | GDSPoint::GDSPoint() 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /gds2/gdspoint.h: -------------------------------------------------------------------------------- 1 | #ifndef GDSPOINT_H 2 | #define GDSPOINT_H 3 | 4 | #include 5 | 6 | class GDSPoint 7 | { 8 | public: 9 | GDSPoint(); 10 | int x, y; 11 | }; 12 | 13 | #endif // GDSPOINT_H 14 | -------------------------------------------------------------------------------- /gds2/gdtdata.h: -------------------------------------------------------------------------------- 1 | #ifndef GDTDATA_H 2 | #define GDTDATA_H 3 | 4 | #include 5 | #include 6 | 7 | #include "gdscell.h" 8 | 9 | class GDSFile; 10 | class GDTData 11 | { 12 | public: 13 | GDTData(QString fileName); // constructor to open (create if WRITE) stream file (calls opstrm()) 14 | bool containsCell(QString name); 15 | GDSCell* getCell(QString name); 16 | QVector getCells(); 17 | 18 | private: 19 | void goThroughFile(); 20 | void buildDataStructure(); 21 | 22 | GDSFile *m_file; 23 | QString m_fileName; 24 | 25 | QVector m_cells; 26 | }; 27 | 28 | #endif // GDTDATA_H 29 | -------------------------------------------------------------------------------- /helpers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(blif2BSpice blif2BSpice.c) 2 | add_executable(blif2Verilog blif2Verilog.c) 3 | add_executable(blifFanout blifFanout.c hash.c readliberty.c) 4 | add_executable(spice2delay spice2delay.c hash.c readliberty.c) 5 | add_executable(vesta vesta.c hash.c) 6 | -------------------------------------------------------------------------------- /helpers/blif2BSpice.pro: -------------------------------------------------------------------------------- 1 | TARGET = blif2BSpice 2 | TEMPLATE = app 3 | SOURCES = blif2BSpice.c 4 | HEADERS = blif2BSpice.h 5 | -------------------------------------------------------------------------------- /helpers/blif2Verilog.pro: -------------------------------------------------------------------------------- 1 | TARGET = blif2Verilog 2 | TEMPLATE = app 3 | SOURCES = blif2Verilog.c 4 | HEADERS = blif2Verilog.h 5 | -------------------------------------------------------------------------------- /helpers/blifFanout.pro: -------------------------------------------------------------------------------- 1 | TARGET = blifFanout 2 | TEMPLATE = app 3 | SOURCES = blifFanout.c hash.c readliberty.c 4 | HEADERS = blifFanout.h hash.h readliberty.h 5 | -------------------------------------------------------------------------------- /helpers/spice2delay.pro: -------------------------------------------------------------------------------- 1 | TARGET = spice2delay 2 | TEMPLATE = app 3 | SOURCES = spice2delay.c hash.c readliberty.c 4 | HEADERS = spice2delay.h hash.h readliberty.h 5 | 6 | 7 | -------------------------------------------------------------------------------- /helpers/vesta.pro: -------------------------------------------------------------------------------- 1 | TARGET = vesta 2 | TEMPLATE = app 3 | SOURCES = vesta.c 4 | HEADERS = vesta.h 5 | -------------------------------------------------------------------------------- /icons/.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | PreviewsShown=true 3 | Timestamp=2017,9,17,23,49,0 4 | Version=4 5 | -------------------------------------------------------------------------------- /icons/add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /icons/annotate_down_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /icons/annotate_right_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /icons/axis3d.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /icons/axis3d_back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /icons/axis3d_bottom.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /icons/axis3d_top.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /icons/dashline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/document-save-all.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/document-save-as.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/document-save.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /icons/drag_outline_segment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/drag_pad.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/drag_segment_withslope.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/drag_track_segment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /icons/drc2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/icon_background_metal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/lang_catalan.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /icons/lang_chinese.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /icons/lang_cs.svg: -------------------------------------------------------------------------------- 1 | 2 | Flag of the Czech Republic 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/lang_de.svg: -------------------------------------------------------------------------------- 1 | 2 | Flag of Germany 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/lang_fi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/lang_gr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /icons/lang_hu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /icons/lang_it.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /icons/lang_jp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /icons/lang_nl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/lang_pl.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /icons/lang_ru.svg: -------------------------------------------------------------------------------- 1 | 2 | Flag of Brazil 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /icons/left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /icons/media-playback-pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/media-playback-start.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/media-playback-stop.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/media-seek-backward.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/media-seek-forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/media-skip-backward.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/media-skip-forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /icons/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /icons/mirepcb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /icons/mirror_h.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /icons/mirror_v.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /icons/move_arc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /icons/move_text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /icons/move_track.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /icons/pin_to.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /icons/pinorient_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/pinorient_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /icons/pinorient_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /icons/pinorient_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /icons/pinshape_active_low_input.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/pinshape_active_low_output.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/pinshape_clock_active_low.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /icons/pinshape_clock_fall.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pinshape_clock_invert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/pinshape_clock_normal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pinshape_invert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pinshape_nonlogic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/pinshape_normal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /icons/pintype_3states.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/pintype_bidi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pintype_input.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pintype_noconnect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/pintype_notspecif.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ? 7 | 8 | -------------------------------------------------------------------------------- /icons/pintype_opencoll.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/pintype_openemit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /icons/pintype_output.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pintype_passive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/pintype_powerinput.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /icons/pintype_poweroutput.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/qflow_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/icons/qflow_logo.png -------------------------------------------------------------------------------- /icons/right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /icons/select_layer_pair.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /icons/swap_layer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /icons/tune_diff_pair_length_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/icons/tune_diff_pair_length_legend.png -------------------------------------------------------------------------------- /icons/tune_diff_pair_skew_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/icons/tune_diff_pair_skew_legend.png -------------------------------------------------------------------------------- /icons/tune_single_track_length_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/icons/tune_single_track_length_legend.png -------------------------------------------------------------------------------- /icons/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | W 10 | W 11 | 12 | 13 | -------------------------------------------------------------------------------- /icons/width_net.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /icons/width_segment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /icons/width_track.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /icons/zoom-fit-width.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /icons/zoom-in.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /icons/zoom-next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /icons/zoom-out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /icons/zoom-previous.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /lef/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "LEF") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | BISON_TARGET(LEFParser lef_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/lef_parser.cpp) 7 | FLEX_TARGET(LEFScanner lef_scanner.ll ${CMAKE_CURRENT_BINARY_DIR}/lef_scanner.cpp) 8 | ADD_FLEX_BISON_DEPENDENCY(LEFScanner LEFParser) 9 | 10 | include_directories( 11 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | "${CMAKE_CURRENT_BINARY_DIR}/../qlayout" 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ) 16 | 17 | set(SOURCES 18 | lefdata.cpp 19 | leflayer.cpp 20 | leflayerinfo.cpp 21 | lefmacro.cpp 22 | lefobstruction.cpp 23 | lefpin.cpp 24 | lefport.cpp 25 | lefscanner.cpp 26 | lefvia.cpp 27 | ) 28 | 29 | add_library(${TARGET} SHARED 30 | ${BISON_LEFParser_OUTPUTS} 31 | ${FLEX_LEFScanner_OUTPUTS} 32 | ${SOURCES} 33 | ) 34 | 35 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 36 | 37 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 38 | -------------------------------------------------------------------------------- /lef/lef.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | FLEXSOURCES += $$PWD/lef_scanner.ll 5 | BISONSOURCES += $$PWD/lef_parser.yy 6 | 7 | SOURCES += \ 8 | $$PWD/lefdata.cpp \ 9 | $$PWD/lefscanner.cpp \ 10 | $$PWD/lefpin.cpp \ 11 | $$PWD/lefport.cpp \ 12 | $$PWD/leflayer.cpp \ 13 | $$PWD/lefmacro.cpp \ 14 | $$PWD/lefobstruction.cpp \ 15 | $$PWD/leflayerinfo.cpp \ 16 | $$PWD/lefvia.cpp 17 | 18 | HEADERS += \ 19 | $$PWD/lefdata.h \ 20 | $$PWD/lefscanner.h \ 21 | $$PWD/lefpin.h \ 22 | $$PWD/lefport.h \ 23 | $$PWD/leflayer.h \ 24 | $$PWD/lefmacro.h \ 25 | $$PWD/lefobstruction.h \ 26 | $$PWD/leflayerinfo.h \ 27 | $$PWD/lefvia.h 28 | -------------------------------------------------------------------------------- /lef/leflayer.cpp: -------------------------------------------------------------------------------- 1 | #include "leflayer.h" 2 | 3 | namespace lef { 4 | QString LEFLayer::getName() 5 | { 6 | return m_name; 7 | } 8 | 9 | QVector LEFLayer::getRects() 10 | { 11 | return m_rects; 12 | } 13 | 14 | LEFLayer::LEFLayer(QString n) : 15 | m_name(n) 16 | { 17 | } 18 | 19 | void LEFLayer::addRectangle(double x, double y, double w, double h) 20 | { 21 | rect_t obj; 22 | obj.x = x; 23 | obj.y = y; 24 | obj.w = w; 25 | obj.h = h; 26 | m_rects.append(obj); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lef/leflayer.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFLAYER_H 2 | #define LEFLAYER_H 3 | 4 | #include 5 | #include 6 | 7 | namespace lef { 8 | typedef struct { 9 | qreal x; 10 | qreal y; 11 | qreal w; 12 | qreal h; 13 | } rect_t; 14 | 15 | class LEFLayer { 16 | public: 17 | LEFLayer(QString); 18 | void addRectangle(double, double, double, double); 19 | QVector getRects(); 20 | 21 | QString getName(); 22 | private: 23 | QString m_name; 24 | QVector m_rects; 25 | 26 | void generateExportLayers(); 27 | }; 28 | } 29 | 30 | #endif // LEFLAYER_H 31 | -------------------------------------------------------------------------------- /lef/leflayerinfo.cpp: -------------------------------------------------------------------------------- 1 | #include "leflayerinfo.h" 2 | 3 | LEFLayerInfo::LEFLayerInfo() : 4 | m_pitch(0) 5 | { 6 | } 7 | 8 | void LEFLayerInfo::setName(QString s) 9 | { 10 | m_name = s; 11 | } 12 | 13 | void LEFLayerInfo::setType(QString s) 14 | { 15 | m_type = s; 16 | } 17 | 18 | void LEFLayerInfo::setPitch(double i) 19 | { 20 | m_pitch = i; 21 | } 22 | 23 | QString LEFLayerInfo::getName() 24 | { 25 | return m_name; 26 | } 27 | 28 | QString LEFLayerInfo::getType() 29 | { 30 | return m_type; 31 | } 32 | 33 | double LEFLayerInfo::getPitch() 34 | { 35 | return m_pitch; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /lef/leflayerinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFLAYERINFO_H 2 | #define LEFLAYERINFO_H 3 | 4 | #include 5 | 6 | class LEFLayerInfo 7 | { 8 | public: 9 | LEFLayerInfo(); 10 | void setName(QString s); 11 | void setType(QString s); 12 | void setPitch(double i); 13 | 14 | QString getName(); 15 | QString getType(); 16 | double getPitch(); 17 | 18 | private: 19 | QString m_name; 20 | QString m_type; 21 | double m_pitch; 22 | }; 23 | 24 | #endif // LEFLAYERINFO_H 25 | -------------------------------------------------------------------------------- /lef/lefmacro.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFMACRO_H 2 | #define LEFMACRO_H 3 | 4 | #include "lefpin.h" 5 | #include "lefobstruction.h" 6 | 7 | namespace lef { 8 | class LEFMacro { 9 | public: 10 | LEFMacro(QString); 11 | void addPin(QString); 12 | 13 | void setSize(qreal w, qreal h); 14 | qreal getWidth(); 15 | qreal getHeight(); 16 | 17 | QVector getPinNames(); 18 | QVector getPins(); 19 | LEFPin *getPin(QString name); 20 | QString getName(); 21 | QString getClass(); 22 | QString getSite(); 23 | void setClass(QString s); 24 | void setSite(QString s); 25 | LEFObstruction *getObstruction(); 26 | bool pinExists(QString n); 27 | 28 | private: 29 | QString m_name; 30 | QString m_class; 31 | QString m_site; 32 | QVector m_pins; 33 | LEFObstruction* m_obstructions; 34 | 35 | qreal m_sizeW; 36 | qreal m_sizeH; 37 | }; 38 | } 39 | 40 | #endif // LEFMACRO_H 41 | -------------------------------------------------------------------------------- /lef/lefobstruction.cpp: -------------------------------------------------------------------------------- 1 | #include "lefobstruction.h" 2 | 3 | namespace lef { 4 | LEFObstruction::LEFObstruction() 5 | { 6 | } 7 | 8 | bool LEFObstruction::layerExists(QString n) 9 | { 10 | foreach(lef::LEFLayer *layer, layers) 11 | if(layer->getName()==n) 12 | return true; 13 | return false; 14 | } 15 | 16 | QVector LEFObstruction::getLayers() 17 | { 18 | return layers; 19 | } 20 | 21 | void LEFObstruction::addLayer(QString n) 22 | { 23 | layers.append(new LEFLayer(n)); 24 | } 25 | 26 | LEFLayer* LEFObstruction::getLayer(QString n) 27 | { 28 | LEFLayer *ret = NULL; 29 | foreach(LEFLayer *l, layers) 30 | if(l->getName()==n) 31 | ret=l; 32 | return ret; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lef/lefobstruction.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFOBSTRUCTION_H 2 | #define LEFOBSTRUCTION_H 3 | 4 | #include 5 | 6 | #include "leflayer.h" 7 | 8 | namespace lef { 9 | class LEFObstruction { 10 | public: 11 | LEFObstruction(); 12 | void addLayer(QString); 13 | QVector getLayers(); 14 | bool layerExists(QString n); 15 | LEFLayer *getLayer(QString); 16 | void scaleObstruction(double,double); 17 | 18 | private: 19 | QVector layers; 20 | }; 21 | } 22 | 23 | 24 | #endif // LEFOBSTRUCTION_H 25 | -------------------------------------------------------------------------------- /lef/lefpin.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFPIN_H 2 | #define LEFPIN_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "lefport.h" 9 | 10 | namespace lef { 11 | enum pin_direction { 12 | PIN_INPUT, 13 | PIN_OUTPUT, 14 | PIN_INOUT 15 | }; 16 | class LEFPin { 17 | public: 18 | LEFPin(QString); 19 | void setBoundingBox(double x1, double y1, double x2, double y2); 20 | void setDirection(QString s); 21 | QRectF getBoundingBox(); 22 | 23 | QString getName(); 24 | LEFPort *getPort(); 25 | QVector getPortLayers(); 26 | QPointF getCenter(); 27 | pin_direction getDirection(); 28 | qreal width(); 29 | qreal height(); 30 | 31 | private: 32 | QString name; 33 | LEFPort *port; 34 | pin_direction m_direction; 35 | 36 | // bounding box: 37 | qreal m_x1; 38 | qreal m_y1; 39 | qreal m_x2; 40 | qreal m_y2; 41 | bool m_bbox_set; 42 | }; 43 | } 44 | 45 | 46 | #endif // LEFPIN_H 47 | -------------------------------------------------------------------------------- /lef/lefport.cpp: -------------------------------------------------------------------------------- 1 | #include "lefport.h" 2 | 3 | namespace lef { 4 | LEFPort::LEFPort() 5 | { 6 | } 7 | 8 | LEFLayer* LEFPort::getLayer(QString n) 9 | { 10 | LEFLayer *ret = NULL; 11 | foreach(LEFLayer *l, m_layers) 12 | if(l->getName()==n) 13 | ret=l; 14 | return ret; 15 | } 16 | 17 | void LEFPort::addLayer(QString n) 18 | { 19 | m_layers.append(new LEFLayer(n)); 20 | } 21 | 22 | bool LEFPort::layerExists(QString n) 23 | { 24 | foreach(lef::LEFLayer *layer, m_layers) 25 | if(layer->getName()==n) 26 | return true; 27 | return false; 28 | } 29 | 30 | QVector LEFPort::getLayerNames() 31 | { 32 | QVector ret; 33 | foreach(LEFLayer *l, m_layers) ret.append(l->getName()); 34 | return ret; 35 | } 36 | 37 | QVector LEFPort::getLayers() 38 | { 39 | return m_layers; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lef/lefport.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFPORT_H 2 | #define LEFPORT_H 3 | 4 | #include 5 | 6 | #include "leflayer.h" 7 | 8 | namespace lef { 9 | class LEFPort { 10 | public: 11 | LEFPort(); 12 | QVector getLayerNames(); 13 | QVector getLayers(); 14 | LEFLayer *getLayer(QString); 15 | bool layerExists(QString n); 16 | 17 | void addLayer(QString); 18 | private: 19 | QVector m_layers; 20 | 21 | }; 22 | } 23 | 24 | #endif // LEFPORT_H 25 | -------------------------------------------------------------------------------- /lef/lefscanner.cpp: -------------------------------------------------------------------------------- 1 | #include "lefscanner.h" 2 | namespace lef { 3 | LEFScanner::LEFScanner(std::istream* in, std::ostream* out) : 4 | lefFlexLexer(in, out) 5 | { 6 | 7 | } 8 | } 9 | 10 | int lefFlexLexer::yywrap() 11 | { 12 | return 1; 13 | } 14 | 15 | int lefFlexLexer::yylex() 16 | { 17 | std::cerr << "in lefFlexLexer::yylex() !" << std::endl; 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /lef/lefscanner.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFSCANNER_H 2 | #define LEFSCANNER_H 3 | 4 | #ifndef __FLEX_LEXER_H 5 | #define yyFlexLexer lefFlexLexer 6 | #include 7 | #undef yyFlexLexer 8 | #endif 9 | 10 | #include "lef_parser.hpp" 11 | 12 | namespace lef { 13 | class LEFData; 14 | class LEFScanner : public lefFlexLexer 15 | { 16 | public: 17 | LEFScanner(std::istream* in = 0, std::ostream* out = &std::cout); 18 | int leflex(lef::LEFParser::semantic_type*, lef::LEFData*); 19 | }; 20 | } 21 | 22 | #endif // LEFSCANNER_H 23 | -------------------------------------------------------------------------------- /lef/lefvia.cpp: -------------------------------------------------------------------------------- 1 | #include "lefvia.h" 2 | 3 | namespace lef { 4 | LEFVia::LEFVia(QString s) : 5 | m_recentLayer(NULL), 6 | m_x1(0), 7 | m_x2(0), 8 | m_y1(0), 9 | m_y2(0) 10 | { 11 | m_name = s; 12 | } 13 | 14 | qreal LEFVia::x() 15 | { 16 | return m_x1; 17 | } 18 | 19 | qreal LEFVia::y() 20 | { 21 | return m_y1; 22 | } 23 | 24 | qreal LEFVia::width() 25 | { 26 | return m_x2-m_x1; 27 | } 28 | 29 | qreal LEFVia::height() 30 | { 31 | return m_y2-m_y1; 32 | } 33 | 34 | QString LEFVia::getName() 35 | { 36 | return m_name; 37 | } 38 | 39 | QVector LEFVia::getLayers() 40 | { 41 | return m_layers; 42 | } 43 | 44 | void LEFVia::addLayer(QString n) 45 | { 46 | m_recentLayer = new LEFLayer(n); 47 | m_layers.append(m_recentLayer); 48 | } 49 | 50 | void LEFVia::addRect(double x1, double y1, double x2, double y2) 51 | { 52 | if(m_x1 > x1) m_x1 = x1; 53 | if(m_y1 > y1) m_y1 = y1; 54 | if(m_x2 < x2) m_x2 = x2; 55 | if(m_y2 < y2) m_y2 = y2; 56 | if(m_recentLayer) { 57 | m_recentLayer->addRectangle(x1,y1,x2,y2); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lef/lefvia.h: -------------------------------------------------------------------------------- 1 | #ifndef LEFVIA_H 2 | #define LEFVIA_H 3 | 4 | #include 5 | #include "leflayer.h" 6 | 7 | namespace lef { 8 | class LEFVia 9 | { 10 | public: 11 | LEFVia(QString s); 12 | void addLayer(QString n); 13 | void addRect(double x1, double y1, double x2, double y2); 14 | 15 | qreal x(); 16 | qreal y(); 17 | qreal height(); 18 | qreal width(); 19 | 20 | QString getName(); 21 | QVector getLayers(); 22 | 23 | private: 24 | QVector m_layers; 25 | QString m_name; 26 | 27 | qreal m_x1; 28 | qreal m_y1; 29 | qreal m_x2; 30 | qreal m_y2; 31 | 32 | LEFLayer *m_recentLayer; 33 | }; 34 | } 35 | 36 | #endif // LEFVIA_H 37 | -------------------------------------------------------------------------------- /magic/magic.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | FLEXSOURCES += $$PWD/magic_scanner.ll 5 | BISONSOURCES += $$PWD/magic_parser.yy 6 | 7 | SOURCES += \ 8 | $$PWD/magicdata.cpp \ 9 | $$PWD/magiclayouteditor.cpp \ 10 | $$PWD/magiclayouteditorwidget.cpp \ 11 | $$PWD/magicscanner.cpp 12 | 13 | HEADERS += \ 14 | $$PWD/magicdata.h \ 15 | $$PWD/magiclayouteditor.h \ 16 | $$PWD/magiclayouteditorwidget.h \ 17 | $$PWD/magicscanner.h 18 | 19 | -------------------------------------------------------------------------------- /magic/magic_editor.cpp: -------------------------------------------------------------------------------- 1 | #include "magic_editor_app.h" 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | MagicEditor app(argc, argv); 6 | return app.exec(); 7 | } 8 | -------------------------------------------------------------------------------- /magic/magic_editor_app.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "magiclayouteditorwidget.h" 5 | 6 | class MagicEditor : public QApplication { 7 | Q_OBJECT 8 | 9 | QCommandLineParser *parser; 10 | public: 11 | MagicEditor(int &argc, char **argv); 12 | int exec(); 13 | }; 14 | -------------------------------------------------------------------------------- /magic/magiclayouteditor.h: -------------------------------------------------------------------------------- 1 | #ifndef MAGICLAYOUTEDITOR_H 2 | #define MAGICLAYOUTEDITOR_H 3 | 4 | #include "magic/magicdata.h" 5 | 6 | #include "qlayout/genericlayouteditor.h" 7 | 8 | namespace magic { 9 | class MagicData; 10 | } 11 | 12 | class MagicLayoutEditor : public GenericLayoutEditor 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit MagicLayoutEditor(QWidget *parent = nullptr); 17 | void loadFile(QString); 18 | void saveFile(); 19 | 20 | private: 21 | /* magic output functions */ 22 | void saveFileWriteHeader(QTextStream &outputStream); 23 | void saveFileWriteRects(QTextStream &outputStream); 24 | void saveFileWriteMacros(QTextStream &outputStream); 25 | /* end of magic output functions */ 26 | 27 | void addRectangles(); 28 | void addMacroInstances(); 29 | 30 | magic::MagicData *magicdata; 31 | }; 32 | 33 | #endif // MAGICLAYOUTEDITOR_H 34 | -------------------------------------------------------------------------------- /magic/magiclayouteditorwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "magiclayouteditorwidget.h" 2 | 3 | MagicLayoutEditorWidget::MagicLayoutEditorWidget(QWidget *parent) : 4 | GenericLayoutEditorWidget(parent), 5 | view3D(new Magic3D(this)) 6 | { 7 | QAction *button; 8 | setType(MagicLayoutEditorWidgetType); 9 | 10 | // setting up all the tool bar content 11 | setUpCentralWidget(new MagicLayoutEditor(this)); 12 | 13 | button = addToolbarAction(QPixmap(":/icon_3d.svg"), "3D view"); 14 | connect(button, SIGNAL(triggered(bool)), this, SLOT(show3D())); 15 | } 16 | 17 | void MagicLayoutEditorWidget::show3D() 18 | { 19 | view3D->show(); 20 | } 21 | -------------------------------------------------------------------------------- /magic/magiclayouteditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef MAGICLAYOUTEDITORWIDGET_H 2 | #define MAGICLAYOUTEDITORWIDGET_H 3 | 4 | #include 5 | #include 6 | 7 | #include "magiclayouteditor.h" 8 | #include "qlayout/genericlayouteditorwidget.h" 9 | #include "magic3d/magic3d.h" 10 | 11 | #include "qlayout/layoutvisibles.h" 12 | 13 | class MagicLayoutEditorWidget : public GenericLayoutEditorWidget 14 | { 15 | Q_OBJECT 16 | public: 17 | MagicLayoutEditorWidget(QWidget *parent = nullptr); 18 | 19 | public slots: 20 | void show3D(); 21 | 22 | private: 23 | Magic3D *view3D; 24 | }; 25 | 26 | #endif // MAGICLAYOUTEDITORWIDGET_H 27 | -------------------------------------------------------------------------------- /magic/magicscanner.cpp: -------------------------------------------------------------------------------- 1 | #include "magic_parser.hpp" 2 | #include "magicscanner.h" 3 | 4 | namespace magic { 5 | MagicScanner::MagicScanner(std::istream* in, std::ostream* out) : 6 | magicFlexLexer(in, out) 7 | { 8 | 9 | } 10 | } 11 | 12 | int magicFlexLexer::yywrap() 13 | { 14 | return 1; 15 | } 16 | 17 | int magicFlexLexer::yylex() 18 | { 19 | std::cerr << "in vcdFlexLexer::yylex() !" << std::endl; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /magic/magicscanner.h: -------------------------------------------------------------------------------- 1 | #ifndef MAGICSCANNER_H 2 | #define MAGICSCANNER_H 3 | 4 | #ifndef __FLEX_LEXER_H 5 | #define yyFlexLexer magicFlexLexer 6 | #include 7 | #undef yyFlexLexer 8 | #endif 9 | 10 | namespace magic { 11 | class MagicScanner : public magicFlexLexer 12 | { 13 | public: 14 | MagicScanner(std::istream* in = 0, std::ostream* out = &std::cout); 15 | int magiclex(magic::MagicParser::semantic_type*, MagicData*); 16 | }; 17 | } 18 | 19 | #endif // MAGICSCANNER_H 20 | -------------------------------------------------------------------------------- /magic3d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "Magic3D") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | glwidget.cpp 14 | magic3d.cpp 15 | ) 16 | 17 | add_library(${TARGET} SHARED 18 | ${SOURCES} 19 | ) 20 | 21 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 22 | 23 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 24 | 25 | -------------------------------------------------------------------------------- /magic3d/magic3d.h: -------------------------------------------------------------------------------- 1 | #ifndef MAGIC3D_H 2 | #define MAGIC3D_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "glwidget.h" 11 | 12 | class Magic3D : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | Magic3D(QWidget *parent = nullptr); 18 | void loadFile(QString file); 19 | 20 | private: 21 | GLWidget *view; 22 | QVBoxLayout *layout; 23 | QToolBar *toolbar; 24 | }; 25 | 26 | #endif // MAGIC3D_H 27 | -------------------------------------------------------------------------------- /magic3d/magic3d.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | #FLEXSOURCES += $$PWD/magic_scanner.ll 5 | #BISONSOURCES += $$PWD/magic_parser.yy 6 | 7 | #SOURCES += \ 8 | # $$PWD/magicscanner.cpp 9 | 10 | #HEADERS += \ 11 | # $$PWD/magicscanner.h 12 | 13 | 14 | FORMS += 15 | 16 | HEADERS += \ 17 | $$PWD/magic3d.h \ 18 | $$PWD/glwidget.h 19 | 20 | SOURCES += \ 21 | $$PWD/magic3d.cpp \ 22 | $$PWD/glwidget.cpp 23 | -------------------------------------------------------------------------------- /qeditor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "QEditor") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | codeeditorwidget.cpp 14 | editorwidget.cpp 15 | generictexteditorwidget.cpp 16 | ) 17 | 18 | add_library(${TARGET} SHARED 19 | ${SOURCES} 20 | ) 21 | 22 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 23 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 24 | -------------------------------------------------------------------------------- /qeditor/codeeditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CODEEDITORWIDGET_H 2 | #define CODEEDITORWIDGET_H 3 | 4 | #include "editorwidget.h" 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | class CodeEditorWidget : public EditorWidget 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit CodeEditorWidget(QWidget *parent = nullptr); 22 | void loadFile(QString); 23 | QString getFilePath(); 24 | 25 | public slots: 26 | void onContentChanged(); 27 | void runSimulation(); 28 | void runSynthesis(); 29 | void saveFile(); 30 | 31 | private: 32 | KTextEditor::Editor *edit; 33 | KTextEditor::Document *doc; 34 | KTextEditor::View *view; 35 | 36 | QFileInfo fileInfo; 37 | }; 38 | 39 | #endif // EDITORWIDGET_H 40 | -------------------------------------------------------------------------------- /qeditor/editorwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "editorwidget.h" 2 | 3 | EditorWidget::EditorWidget(QWidget *parent) : 4 | QMainWindow(parent), 5 | statusChanged(false), 6 | widgetType(BareEditorWidgetType) 7 | { 8 | m_toolbar = new QToolBar(this); 9 | 10 | QPixmap pixmap(":/document-save.svg"); 11 | QAction *button; 12 | 13 | button = new QAction(pixmap,"S&ave", m_toolbar); 14 | connect(button,SIGNAL(triggered(bool)),this,SLOT(saveFile())); 15 | 16 | QShortcut *saveShortcut = new QShortcut(QKeySequence("Ctrl+S"), this); 17 | connect(saveShortcut, SIGNAL(activated()),this,SLOT(saveFile())); 18 | 19 | m_toolbar->addAction(button); 20 | 21 | addToolBar(m_toolbar); 22 | } 23 | 24 | void EditorWidget::setStatusChanged(bool t) 25 | { 26 | statusChanged = t; 27 | } 28 | 29 | bool EditorWidget::getStatusChanged() 30 | { 31 | return statusChanged; 32 | } 33 | 34 | void EditorWidget::loadFile(QString path) { filePath = path; } 35 | QString EditorWidget::getFilePath() { return filePath; } 36 | void EditorWidget::onContentChanged() {} 37 | void EditorWidget::saveFile() {} 38 | void EditorWidget::closeFile() {} 39 | 40 | WidgetType EditorWidget::getType() { return widgetType; } 41 | void EditorWidget::setType(WidgetType t) { widgetType = t; } 42 | -------------------------------------------------------------------------------- /qeditor/editorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef EDITORWIDGET_H 2 | #define EDITORWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | enum WidgetType { 14 | BareEditorWidgetType, 15 | SchematicsEditorWidgetType, 16 | MagicLayoutEditorWidgetType, 17 | DEFLayoutEditorWidgetType, 18 | VerilogCodeEditorWidgetType 19 | }; 20 | 21 | class EditorWidget : public QMainWindow 22 | { 23 | Q_OBJECT 24 | public: 25 | explicit EditorWidget(QWidget *parent = nullptr); 26 | virtual void loadFile(QString); 27 | virtual QString getFilePath(); 28 | 29 | virtual WidgetType getType(); 30 | void setType(WidgetType); 31 | 32 | bool getStatusChanged(); 33 | void setStatusChanged(bool); 34 | 35 | virtual void closeFile(); 36 | 37 | signals: 38 | void contentChanged(); 39 | void contentSaved(); 40 | 41 | public slots: 42 | virtual void onContentChanged(); 43 | virtual void saveFile(); 44 | 45 | private: 46 | bool statusChanged; 47 | QString filePath; 48 | WidgetType widgetType; 49 | 50 | protected: 51 | QToolBar *m_toolbar; 52 | QLabel *m_lambdaInfo; 53 | }; 54 | 55 | #endif // EDITORWIDGET_H 56 | -------------------------------------------------------------------------------- /qeditor/generictexteditorwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "generictexteditorwidget.h" 2 | 3 | GenericTextEditorWidget::GenericTextEditorWidget(QWidget *parent) : 4 | EditorWidget(parent), 5 | edit(KTextEditor::Editor::instance()), 6 | doc(edit->createDocument(this)), 7 | view(doc->createView(this)), 8 | fileInfo(QFileInfo()) 9 | { 10 | setCentralWidget(view); 11 | setType(VerilogCodeEditorWidgetType); 12 | connect(doc,SIGNAL(textChanged(KTextEditor::Document*)),this,SLOT(onContentChanged())); 13 | } 14 | 15 | void GenericTextEditorWidget::saveFile() 16 | { 17 | QString filePath = fileInfo.absoluteFilePath(); 18 | if (filePath == QString()) 19 | return; 20 | 21 | doc->saveAs(QUrl::fromLocalFile(filePath)); 22 | setStatusChanged(false); 23 | emit(contentSaved()); 24 | } 25 | 26 | void GenericTextEditorWidget::loadFile(QString path) 27 | { 28 | fileInfo = QFileInfo(path); 29 | 30 | QString filePath = fileInfo.absoluteFilePath(); 31 | if (filePath == QString()) 32 | return; 33 | 34 | doc->openUrl(QUrl::fromLocalFile(filePath)); 35 | setStatusChanged(false); 36 | } 37 | 38 | QString GenericTextEditorWidget::getFilePath() 39 | { 40 | return fileInfo.absoluteFilePath(); 41 | } 42 | 43 | void GenericTextEditorWidget::onContentChanged() 44 | { 45 | setStatusChanged(true); 46 | emit(contentChanged()); 47 | } 48 | -------------------------------------------------------------------------------- /qeditor/generictexteditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef GENERICTEXTEDITORWIDGET_H 2 | #define GENERICTEXTEDITORWIDGET_H 3 | 4 | #include "editorwidget.h" 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | class GenericTextEditorWidget : public EditorWidget 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit GenericTextEditorWidget(QWidget *parent = nullptr); 22 | void loadFile(QString); 23 | QString getFilePath(); 24 | 25 | public slots: 26 | void onContentChanged(); 27 | void saveFile(); 28 | 29 | private: 30 | KTextEditor::Editor *edit; 31 | KTextEditor::Document *doc; 32 | KTextEditor::View *view; 33 | 34 | QFileInfo fileInfo; 35 | }; 36 | 37 | #endif // GENERICTEXTEDITORWIDGET_H 38 | -------------------------------------------------------------------------------- /qlayout/drcsettings.h: -------------------------------------------------------------------------------- 1 | #ifndef DRCSETTINGS_H 2 | #define DRCSETTINGS_H 3 | 4 | #include 5 | #include 6 | 7 | #include "ui_drcsettings.h" 8 | #include "tech_reader/techdesignrule.h" 9 | 10 | class DRCSettings : public QDialog 11 | { 12 | Q_OBJECT 13 | public: 14 | DRCSettings(QWidget *parent = Q_NULLPTR); 15 | 16 | public slots: 17 | void on_buttonBox_accepted(); 18 | void on_runDRC_pressed(); 19 | 20 | signals: 21 | void runDRC(); 22 | 23 | private: 24 | void refreshRuleList(); 25 | 26 | Ui::DRCSettings *ui; 27 | }; 28 | 29 | #endif // DRCSETTINGS_H 30 | -------------------------------------------------------------------------------- /qlayout/genericlayouteditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef GENERICLAYOUTEDITORWIDGET_H 2 | #define GENERICLAYOUTEDITORWIDGET_H 3 | 4 | #include 5 | #include 6 | 7 | #include "genericlayouteditor.h" 8 | #include "qeditor/editorwidget.h" 9 | 10 | #include "qlayout/layoutvisibles.h" 11 | 12 | #include 13 | 14 | class GenericLayoutEditorWidget : public EditorWidget 15 | { 16 | Q_OBJECT 17 | public: 18 | GenericLayoutEditorWidget(QWidget *parent = nullptr); 19 | void loadFile(QString); 20 | void loadLEF(QString); 21 | void loadGDS(QString); 22 | void setTechnologyData(TechDataWrapper* toml); 23 | void setLambdaUnit(QString s); 24 | void setLambdaValue(qreal i); 25 | QString getFilePath(); 26 | 27 | protected: 28 | QAction *addToolbarAction(QPixmap pm, QString str); 29 | void setUpCentralWidget(GenericLayoutEditor *area); 30 | 31 | public slots: 32 | void onContentChanged(); 33 | void saveFile(); 34 | void drawingOperation(); 35 | 36 | private: 37 | void addDrawingLayerSelection(); 38 | 39 | QMap m_drawingOperations; 40 | LayoutVisibles *m_layoutVisibles; 41 | QComboBox *m_activeLayer; 42 | }; 43 | 44 | #endif // GENERICLAYOUTEDITORWIDGET_H 45 | -------------------------------------------------------------------------------- /qlayout/layoutvisibles.h: -------------------------------------------------------------------------------- 1 | #ifndef LAYOUTVISIBLES_H 2 | #define LAYOUTVISIBLES_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "ui_layoutvisibles.h" 9 | #include "tech_reader/techdesignrule.h" 10 | #include "qlayout/tech_data_wrapper.hpp" 11 | 12 | class LayoutVisibles : public QDockWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit LayoutVisibles(QWidget *parent = nullptr); 17 | 18 | bool typeIsEnabled(QString s); 19 | void setTechData(TechDataWrapper*toml); 20 | 21 | public slots: 22 | void changeColor(); 23 | void on_layerList_customContextMenuRequested(const QPoint &pos); 24 | void handleClick(QTreeWidgetItem *item, int column); 25 | void handleSearch(QString); 26 | void onRegisterLayer(QString s); 27 | 28 | signals: 29 | void enabledTypesChanged(QStringList); 30 | void setCurrentLayer(QString); 31 | 32 | private: 33 | QStringList getEnabledTypes(); 34 | 35 | void refreshLists(); 36 | Ui::LayoutVisibles *ui; 37 | 38 | QVector typeEntries; 39 | QVector typeRootEntries; 40 | }; 41 | 42 | #endif // LAYOUTVISIBLES_H 43 | -------------------------------------------------------------------------------- /qlayout/qlayoutcellmanager.h: -------------------------------------------------------------------------------- 1 | #ifndef QLAYOUTCELLMANAGER_H 2 | #define QLAYOUTCELLMANAGER_H 3 | 4 | #include 5 | 6 | #include "ui_cellmanager.h" 7 | 8 | class QLayoutCellManager : public QDialog 9 | { 10 | Q_OBJECT 11 | public: 12 | QLayoutCellManager(QWidget *parent = Q_NULLPTR); 13 | void addCell(QString instance, QString macro); 14 | 15 | public slots: 16 | void on_treeWidget_itemChanged(QTreeWidgetItem *item, int column); 17 | 18 | signals: 19 | void setGDS(QString,bool); 20 | void setLEF(QString,bool); 21 | 22 | private: 23 | void refreshTable(); 24 | Ui::CellManager* ui; 25 | QMap m_macroTable; 26 | }; 27 | 28 | #endif // QLAYOUTCELLMANAGER_H 29 | -------------------------------------------------------------------------------- /qlayout/qlayoutdistancemeasure.cpp: -------------------------------------------------------------------------------- 1 | #include "qlayoutdistancemeasure.h" 2 | 3 | QLayoutDistanceMeasure::QLayoutDistanceMeasure(QString s, QPointF p1, QPointF p2, QGraphicsItem *parent) : 4 | QGraphicsItem(parent), 5 | m_label(NULL), 6 | m_mainLine(NULL) 7 | { 8 | m_mainLine = new QGraphicsLineItem(QLineF(p1,p2), this); 9 | m_label = new QGraphicsSimpleTextItem(s, m_mainLine); 10 | } 11 | 12 | QLayoutDistanceMeasure::QLayoutDistanceMeasure(QGraphicsItem *parent) : 13 | QGraphicsItem(parent), 14 | m_label(NULL), 15 | m_mainLine(NULL) 16 | { 17 | } 18 | 19 | void QLayoutDistanceMeasure::updateLabel(QString s) 20 | { 21 | if(m_mainLine) { 22 | if(m_label==NULL) { 23 | m_label = new QGraphicsSimpleTextItem(this); 24 | } 25 | m_label->setText(s); 26 | m_label->setPos((m_p2+m_p1)/2); 27 | qDebug() << m_label->pos(); 28 | } 29 | } 30 | 31 | void QLayoutDistanceMeasure::setLine(qreal x1, qreal y1, qreal x2, qreal y2) 32 | { 33 | if(m_mainLine==NULL) { 34 | m_mainLine = new QGraphicsLineItem(this); 35 | } 36 | m_mainLine->setLine(x1,y1,x2,y2); 37 | m_p1 = QPointF(x1,y1); 38 | m_p2 = QPointF(x2,y2); 39 | } 40 | 41 | QRectF QLayoutDistanceMeasure::boundingRect() const 42 | { 43 | } 44 | 45 | void QLayoutDistanceMeasure::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) 46 | { 47 | } 48 | -------------------------------------------------------------------------------- /qlayout/qlayoutdistancemeasure.h: -------------------------------------------------------------------------------- 1 | #ifndef QLAYOUTDISTANCEMEASURE_H 2 | #define QLAYOUTDISTANCEMEASURE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class QLayoutDistanceMeasure : public QGraphicsItem 9 | { 10 | public: 11 | QLayoutDistanceMeasure(QString s, QPointF p1, QPointF p2, QGraphicsItem *parent = Q_NULLPTR); 12 | QLayoutDistanceMeasure(QGraphicsItem *parent = Q_NULLPTR); 13 | void updateLabel(QString s); 14 | void setLine(qreal x1, qreal y1, qreal x2, qreal y2); 15 | QRectF boundingRect() const; 16 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR); 17 | 18 | private: 19 | QGraphicsSimpleTextItem *m_label; 20 | QGraphicsLineItem *m_mainLine; 21 | QPointF m_p1; 22 | QPointF m_p2; 23 | }; 24 | 25 | #endif // QLAYOUTDISTANCEMEASURE_H 26 | -------------------------------------------------------------------------------- /qlayout/qlayoutlabel.cpp: -------------------------------------------------------------------------------- 1 | #include "qlayoutlabel.h" 2 | 3 | QLayoutLabel::QLayoutLabel() 4 | { 5 | } 6 | 7 | QRectF QLayoutLabel::boundingRect() const 8 | { 9 | } 10 | 11 | void QLayoutLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /qlayout/qlayoutlabel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLAYOUTLABEL_H 2 | #define QLAYOUTLABEL_H 3 | 4 | #include 5 | 6 | class QLayoutLabel : public QGraphicsItem 7 | { 8 | public: 9 | QLayoutLabel(); 10 | QRectF boundingRect() const; 11 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR); 12 | }; 13 | 14 | #endif // QLAYOUTLABEL_H 15 | -------------------------------------------------------------------------------- /qlayout/qlayoutmacropinitem.h: -------------------------------------------------------------------------------- 1 | #ifndef QLAYOUTMACROPINITEM_H 2 | #define QLAYOUTMACROPINITEM_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class QLayoutMacroPinItem : public QObject, public QGraphicsRectItem 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit QLayoutMacroPinItem(qreal scale, QLayoutMacroPinItem *orig = Q_NULLPTR, QGraphicsItem *parent = Q_NULLPTR); 16 | explicit QLayoutMacroPinItem(QGraphicsItem *parent = Q_NULLPTR); 17 | 18 | void addRectangle(QString layer, QBrush brush, QRectF rect); 19 | void setName(QString s); 20 | 21 | signals: 22 | 23 | public slots: 24 | private: 25 | QString m_name; 26 | QGraphicsSimpleTextItem* m_label; 27 | QMap> m_layerList; 28 | 29 | qreal m_x1; 30 | qreal m_x2; 31 | qreal m_y1; 32 | qreal m_y2; 33 | }; 34 | 35 | #endif // QLAYOUTMACROPINITEM_H 36 | -------------------------------------------------------------------------------- /qlayout/qlayoutviaitem.h: -------------------------------------------------------------------------------- 1 | #ifndef QLAYOUTVIAITEM_H 2 | #define QLAYOUTVIAITEM_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class QLayoutViaItem : public QGraphicsRectItem 9 | { 10 | public: 11 | explicit QLayoutViaItem(QLayoutViaItem *parent); 12 | explicit QLayoutViaItem(qreal x, qreal y, qreal w, qreal h); 13 | 14 | void addRectangle(QString layer, QBrush brush, QRectF rect); 15 | 16 | private: 17 | bool m_dragged; 18 | QString m_viaName; 19 | qreal m_width; 20 | qreal m_height; 21 | 22 | QMap> m_layerList; 23 | }; 24 | 25 | #endif // QLAYOUTVIAITEM_H 26 | -------------------------------------------------------------------------------- /qlayout/qlayoutwireitem.cpp: -------------------------------------------------------------------------------- 1 | #include "qlayoutwireitem.h" 2 | 3 | QLayoutWireItem::QLayoutWireItem(QGraphicsItem* parent) : 4 | QGraphicsRectItem(parent), 5 | m_dragged(false) 6 | { 7 | setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable); 8 | } 9 | 10 | QLayoutWireItem::QLayoutWireItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent) : 11 | QGraphicsRectItem(x,y,w,h,parent), 12 | m_dragged(false) 13 | { 14 | 15 | } 16 | 17 | void QLayoutWireItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) 18 | { 19 | m_dragged = true; 20 | QGraphicsRectItem::mouseMoveEvent(event); 21 | } 22 | 23 | void QLayoutWireItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) 24 | { 25 | 26 | } 27 | 28 | void QLayoutWireItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) 29 | { 30 | QMenu menu; 31 | QAction *removeAction = menu.addAction("Remove"); 32 | QAction *markAction = menu.addAction("Mark"); 33 | QAction *selectedAction = menu.exec(event->screenPos()); 34 | } 35 | -------------------------------------------------------------------------------- /qlayout/qlayoutwireitem.h: -------------------------------------------------------------------------------- 1 | #ifndef QLAYOUTWIREITEM_H 2 | #define QLAYOUTWIREITEM_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class QLayoutWireItem : public QGraphicsRectItem 10 | { 11 | public: 12 | explicit QLayoutWireItem(QGraphicsItem *parent = Q_NULLPTR); 13 | explicit QLayoutWireItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent = Q_NULLPTR); 14 | 15 | protected: 16 | void mouseMoveEvent(QGraphicsSceneMouseEvent *event); 17 | void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); 18 | void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); 19 | 20 | signals: 21 | 22 | public slots: 23 | 24 | private: 25 | bool m_dragged; 26 | }; 27 | 28 | #endif // QLAYOUTWIREITEM_H 29 | -------------------------------------------------------------------------------- /qlayout/tech_data_wrapper.hpp: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_TECHDATA_WRAPPER 2 | #define HEADER_TECHDATA_WRAPPER 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class TechDataWrapper { 17 | public: 18 | TechDataWrapper(QString s); 19 | QStringList getLayers(); 20 | QColor getLayerColor(QString); 21 | QIcon getLayerIcon(QString n); 22 | QString getLambdaUnit(); 23 | qreal getLambdaValue(); 24 | private: 25 | QDomDocument doc; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /qschematics/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "QSchematics") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | qschematicsparametricpart.cpp 14 | qschematicspart.cpp 15 | qschematicspin.cpp 16 | qschematicsscene.cpp 17 | qschematicswire.cpp 18 | ) 19 | 20 | add_library(${TARGET} SHARED 21 | ${SOURCES} 22 | ) 23 | 24 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 25 | 26 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 27 | 28 | -------------------------------------------------------------------------------- /qschematics/qschematics.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | SOURCES += \ 5 | $$PWD/qschematicsscene.cpp \ 6 | $$PWD/qschematicsparametricpart.cpp \ 7 | $$PWD/qschematicswire.cpp \ 8 | $$PWD/qschematicspart.cpp \ 9 | $$PWD/qschematicspin.cpp 10 | 11 | HEADERS += \ 12 | $$PWD/qschematicsscene.h \ 13 | $$PWD/qschematicsparametricpart.h \ 14 | $$PWD/qschematicswire.h \ 15 | $$PWD/qschematicspart.h \ 16 | $$PWD/qschematicspin.h 17 | 18 | -------------------------------------------------------------------------------- /qschematics/qschematicsparametricpart.cpp: -------------------------------------------------------------------------------- 1 | #include "qschematicsparametricpart.h" 2 | 3 | QSchematicsParametricPart::QSchematicsParametricPart() 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /qschematics/qschematicsparametricpart.h: -------------------------------------------------------------------------------- 1 | #ifndef QSCHEMATICSPARAMETRICPART_H 2 | #define QSCHEMATICSPARAMETRICPART_H 3 | 4 | 5 | class QSchematicsParametricPart 6 | { 7 | public: 8 | QSchematicsParametricPart(); 9 | }; 10 | 11 | #endif // QSCHEMATICSPARAMETRICPART_H -------------------------------------------------------------------------------- /qschematics/qschematicspin.h: -------------------------------------------------------------------------------- 1 | #ifndef QSCHEMATICSPIN_H 2 | #define QSCHEMATICSPIN_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class QSchematicsPin : public QGraphicsItem 10 | { 11 | public: 12 | QSchematicsPin(QString name, int index, int x, int y, int length, QString orient, int tw, int th, int a, int b, QString mode, QGraphicsItem* p); 13 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); 14 | QRectF boundingRect() const; 15 | 16 | int getX(); 17 | int getY(); 18 | 19 | private: 20 | QLineF drawLine(int x, int y, int length, QString orient); 21 | 22 | QRectF m_externalRect; 23 | QGraphicsLineItem *m_pinLine; 24 | QGraphicsSimpleTextItem *m_pinLabel; 25 | QGraphicsRectItem *m_pinContact; 26 | 27 | int m_x; 28 | int m_y; 29 | }; 30 | 31 | #endif // QSCHEMATICSPIN_H 32 | -------------------------------------------------------------------------------- /qschematics/qschematicswire.cpp: -------------------------------------------------------------------------------- 1 | #include "qschematicswire.h" 2 | 3 | QSchematicsWire::QSchematicsWire(QString type, qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent) : 4 | QGraphicsLineItem(x1,y1,x2,y2,parent) 5 | { 6 | QPen pen = this->pen(); 7 | pen.setWidth(5); 8 | pen.setCosmetic(true); 9 | setPen(pen); 10 | setVisible(true); 11 | } 12 | -------------------------------------------------------------------------------- /qschematics/qschematicswire.h: -------------------------------------------------------------------------------- 1 | #ifndef QSCHEMATICSWIRE_H 2 | #define QSCHEMATICSWIRE_H 3 | 4 | #include 5 | #include 6 | 7 | class QSchematicsWire : public QGraphicsLineItem 8 | { 9 | public: 10 | QSchematicsWire(QString type, qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent); 11 | }; 12 | 13 | #endif // QSCHEMATICSWIRE_H 14 | -------------------------------------------------------------------------------- /schematics/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "Schematics") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | schematicseditor.cpp 14 | schematicseditorwidget.cpp 15 | schematicslibraryeditor.cpp 16 | schematicsparametricpartdialog.cpp 17 | schematicspart.cpp 18 | schematicspartselection.cpp 19 | schematicswire.cpp 20 | ) 21 | 22 | set(UI_SOURCES 23 | partselection.ui 24 | parametricpart.ui 25 | ) 26 | 27 | qt5_wrap_ui(UI_GENERATED_HEADERS ${UI_SOURCES}) 28 | 29 | add_library(${TARGET} SHARED 30 | ${SOURCES} 31 | ${UI_GENERATED_HEADERS} 32 | ) 33 | 34 | target_link_libraries(${TARGET} 35 | "QSchematics" 36 | ${QT5_LIBRARIES} 37 | ) 38 | 39 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 40 | -------------------------------------------------------------------------------- /schematics/schematics.pri: -------------------------------------------------------------------------------- 1 | 2 | PARSE_OUT_PWD = $$OUT_PWD/schematics 3 | 4 | INCLUDEPATH += $${PARSE_OUT_PWD} 5 | 6 | # This was needed to work around "number of sections exceeded object file format limit" linker error 7 | win32:QMAKE_CXXFLAGS += /bigobj 8 | 9 | SOURCES += \ 10 | $$PWD/schematicseditor.cpp \ 11 | $$PWD/schematicseditorwidget.cpp \ 12 | $$PWD/schematicswire.cpp \ 13 | $$PWD/schematicspart.cpp \ 14 | $$PWD/schematicspartselection.cpp \ 15 | $$PWD/schematicslibraryeditor.cpp \ 16 | $$PWD/schematicsparametricpartdialog.cpp 17 | 18 | HEADERS += \ 19 | $$PWD/schematicseditor.h \ 20 | $$PWD/schematicseditorwidget.h \ 21 | $$PWD/schematicswire.h \ 22 | $$PWD/schematicspart.h \ 23 | $$PWD/schematicspartselection.h \ 24 | $$PWD/schematicslibraryeditor.h \ 25 | $$PWD/schematicsparametricpartdialog.h 26 | -------------------------------------------------------------------------------- /schematics/schematicseditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICEDITORWIDGET_H 2 | #define SCHEMATICEDITORWIDGET_H 3 | 4 | #include "schematicseditor.h" 5 | #include "qeditor/editorwidget.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | class SchematicsEditorWidget : public EditorWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit SchematicsEditorWidget(QWidget *parent = nullptr); 18 | void loadFile(QString); 19 | QString getFilePath(); 20 | 21 | public slots: 22 | void drawingOperation(); 23 | 24 | void onContentChanged(); 25 | void saveFile(); 26 | 27 | private: 28 | void addDrawingOperations(); 29 | 30 | SchematicsEditor *editArea; 31 | 32 | QMap drawingOperations; 33 | }; 34 | 35 | #endif // EDITORWIDGET_H 36 | -------------------------------------------------------------------------------- /schematics/schematicslibraryeditor.cpp: -------------------------------------------------------------------------------- 1 | #include "schematicslibraryeditor.h" 2 | 3 | SchematicsLibraryEditor::SchematicsLibraryEditor(QWidget *parent) : 4 | QDialog(parent) 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /schematics/schematicslibraryeditor.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSLIBRARYEDITOR_H 2 | #define SCHEMATICSLIBRARYEDITOR_H 3 | 4 | #include 5 | 6 | class SchematicsLibraryEditor : public QDialog 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit SchematicsLibraryEditor(QWidget *parent = nullptr); 11 | 12 | signals: 13 | 14 | public slots: 15 | }; 16 | 17 | #endif // SCHEMATICSLIBRARYEDITOR_H 18 | -------------------------------------------------------------------------------- /schematics/schematicsparametricpartdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "schematicsparametricpartdialog.h" 2 | 3 | SchematicsParametricPartDialog::SchematicsParametricPartDialog(QWidget *parent) : 4 | QDialog(parent), 5 | ui(new Ui::ParametricPartDialog) 6 | { 7 | ui->setupUi(this); 8 | } 9 | -------------------------------------------------------------------------------- /schematics/schematicsparametricpartdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSPARAMETRICPARTDIALOG_H 2 | #define SCHEMATICSPARAMETRICPARTDIALOG_H 3 | 4 | #include 5 | 6 | #include "ui_parametricpart.h" 7 | 8 | class SchematicsParametricPartDialog : public QDialog 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit SchematicsParametricPartDialog(QWidget *parent = nullptr); 13 | 14 | signals: 15 | 16 | public slots: 17 | 18 | private: 19 | Ui::ParametricPartDialog *ui; 20 | }; 21 | 22 | #endif // SCHEMATICSPARAMETRICPARTDIALOG_H 23 | -------------------------------------------------------------------------------- /schematics/schematicspart.cpp: -------------------------------------------------------------------------------- 1 | #include "schematicspart.h" 2 | 3 | SchematicsPart::SchematicsPart(QString type, QString id) 4 | { 5 | m_type = type; 6 | m_id = id; 7 | } 8 | 9 | void SchematicsPart::setPosition(int x, int y) 10 | { 11 | m_x = x; 12 | m_y = y; 13 | } 14 | 15 | QString SchematicsPart::getType() 16 | { 17 | return m_type; 18 | } 19 | 20 | QString SchematicsPart::getID() 21 | { 22 | return m_id; 23 | } 24 | 25 | qreal SchematicsPart::x() 26 | { 27 | return m_x; 28 | } 29 | 30 | qreal SchematicsPart::y() 31 | { 32 | return m_y; 33 | } 34 | -------------------------------------------------------------------------------- /schematics/schematicspart.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSPART_H 2 | #define SCHEMATICSPART_H 3 | 4 | #include 5 | 6 | class SchematicsPart 7 | { 8 | public: 9 | SchematicsPart(QString type, QString id); 10 | 11 | void setPosition(int x, int y); 12 | 13 | QString getType(); 14 | QString getID(); 15 | qreal x(); 16 | qreal y(); 17 | 18 | private: 19 | QString m_type; 20 | QString m_id; 21 | qreal m_x; 22 | qreal m_y; 23 | }; 24 | 25 | #endif // SCHEMATICSPART_H 26 | -------------------------------------------------------------------------------- /schematics/schematicspartselection.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSPARTSELECTION_H 2 | #define SCHEMATICSPARTSELECTION_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "ui_partselection.h" 11 | 12 | #include "qschematics/qschematicspart.h" 13 | 14 | class SchematicsPartSelection : public QDialog 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | SchematicsPartSelection(QWidget *parent); 20 | 21 | public slots: 22 | void on_buttonBox_accepted(); 23 | void on_buttonBox_rejected(); 24 | void on_partList_currentItemChanged(QTreeWidgetItem*current, QTreeWidgetItem*previous); 25 | 26 | signals: 27 | void insertPart(QString); 28 | 29 | private: 30 | void updatePartList(); 31 | 32 | Ui::PartSelection *ui; 33 | QGraphicsScene *partPreview; 34 | 35 | QVector m_libraries; 36 | QVector m_libraryParts; 37 | QMap m_libraryPartWidgets; 38 | }; 39 | 40 | #endif // SCHEMATICSPARTSELECTION_H 41 | -------------------------------------------------------------------------------- /schematics/schematicswire.cpp: -------------------------------------------------------------------------------- 1 | #include "schematicswire.h" 2 | 3 | SchematicsWire::SchematicsWire() : 4 | name(QString()), 5 | x1(0), 6 | y1(0), 7 | x2(0), 8 | y2(0) 9 | { 10 | } 11 | 12 | SchematicsWire::SchematicsWire(QString n, int a, int b, int c, int d) 13 | { 14 | name = n; 15 | x1 = a; 16 | y1 = b; 17 | x2 = c; 18 | y2 = d; 19 | } 20 | 21 | QString SchematicsWire::getName() 22 | { 23 | return name; 24 | } 25 | 26 | QPointF SchematicsWire::getPos1() 27 | { 28 | return QPointF(x1,y1); 29 | } 30 | 31 | QPointF SchematicsWire::getPos2() 32 | { 33 | return QPointF(x2,y2); 34 | } 35 | -------------------------------------------------------------------------------- /schematics/schematicswire.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSWIRE_H 2 | #define SCHEMATICSWIRE_H 3 | 4 | #include 5 | #include 6 | 7 | class SchematicsWire 8 | { 9 | public: 10 | SchematicsWire(); 11 | SchematicsWire(QString n, int a, int b, int c, int d); 12 | 13 | QString getName(); 14 | QPointF getPos1(); 15 | QPointF getPos2(); 16 | 17 | private: 18 | QString name; 19 | qreal x1, x2, y1, y2; 20 | }; 21 | 22 | #endif // SCHEMATICSWIRE_H 23 | -------------------------------------------------------------------------------- /schematics_reader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "SchematicsReader") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | BISON_TARGET(SchematicsParser schematics_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/schematics_parser.cpp) 7 | FLEX_TARGET(SchematicsScanner schematics_scanner.ll ${CMAKE_CURRENT_BINARY_DIR}/schematics_scanner.cpp) 8 | ADD_FLEX_BISON_DEPENDENCY(SchematicsScanner SchematicsParser) 9 | 10 | include_directories( 11 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | "${CMAKE_CURRENT_BINARY_DIR}/../qlayout" 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ) 16 | 17 | set(SOURCES 18 | schematicsdata.cpp 19 | schematicsscanner.cpp 20 | ) 21 | 22 | add_library(${TARGET} SHARED 23 | ${BISON_SchematicsParser_OUTPUTS} 24 | ${FLEX_SchematicsScanner_OUTPUTS} 25 | ${SOURCES} 26 | ) 27 | 28 | target_link_libraries(${TARGET} ${QT5_LIBRARIES} QEditor) 29 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 30 | 31 | #if(BUILD_STAND_ALONE_BINARIES) 32 | # add_executable(schematics_editor schematics_editor.cpp schematics_editor_app.cpp) 33 | # target_link_libraries(schematics_editor ${QT5_LIBRARIES} QEditor Schematics QLayout TechReader) 34 | #endif(BUILD_STAND_ALONE_BINARIES) 35 | 36 | -------------------------------------------------------------------------------- /schematics_reader/schematics_reader.pri: -------------------------------------------------------------------------------- 1 | 2 | PARSE_OUT_PWD = $$OUT_PWD/schematics 3 | 4 | INCLUDEPATH += $${PARSE_OUT_PWD} 5 | 6 | # This was needed to work around "number of sections exceeded object file format limit" linker error 7 | win32:QMAKE_CXXFLAGS += /bigobj 8 | 9 | FLEXSOURCES += $$PWD/schematics_scanner.ll 10 | BISONSOURCES += $$PWD/schematics_parser.yy 11 | 12 | SOURCES += \ 13 | $$PWD/schematicsdata.cpp \ 14 | $$PWD/schematicsscanner.cpp 15 | 16 | HEADERS += \ 17 | $$PWD/schematicsdata.h \ 18 | $$PWD/schematicsscanner.h 19 | -------------------------------------------------------------------------------- /schematics_reader/schematicsscanner.cpp: -------------------------------------------------------------------------------- 1 | #include "schematicsscanner.h" 2 | 3 | namespace schematics { 4 | SchematicsScanner::SchematicsScanner(std::istream* in, std::ostream* out): 5 | schematicsFlexLexer(in, out) 6 | { 7 | 8 | } 9 | } 10 | 11 | int schematicsFlexLexer::yywrap() 12 | { 13 | return 1; 14 | } 15 | 16 | int schematicsFlexLexer::yylex() 17 | { 18 | std::cerr << "in vcdFlexLexer::yylex() !" << std::endl; 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /schematics_reader/schematicsscanner.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSSCANNER_H 2 | #define SCHEMATICSSCANNER_H 3 | 4 | #ifndef __FLEX_LEXER_H 5 | #define yyFlexLexer schematicsFlexLexer 6 | #include 7 | #undef yyFlexLexer 8 | #endif 9 | 10 | #include "schematics_parser.hpp" 11 | 12 | namespace schematics { 13 | class SchematicsScanner : public schematicsFlexLexer 14 | { 15 | public: 16 | SchematicsScanner(std::istream* in = 0, std::ostream* out = &std::cout); 17 | int schematicslex(schematics::SchematicsParser::semantic_type*,schematics::SchematicsData*); 18 | }; 19 | } 20 | 21 | #endif // SCHEMATICSSCANNER_H 22 | -------------------------------------------------------------------------------- /scripts/padframe.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | -------------------------------------------------------------------------------- /symbol_reader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "SymbolReader") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | BISON_TARGET(SymbolParser symbol_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/symbol_parser.cpp) 7 | FLEX_TARGET(SymbolScanner symbol_scanner.ll ${CMAKE_CURRENT_BINARY_DIR}/symbol_scanner.cpp) 8 | ADD_FLEX_BISON_DEPENDENCY(SymbolScanner SymbolParser) 9 | 10 | include_directories( 11 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ) 15 | 16 | set(SOURCES 17 | schematicssymbol.cpp 18 | symboldata.cpp 19 | symbolpin.cpp 20 | symbolscanner.cpp 21 | ) 22 | 23 | add_library(${TARGET} SHARED 24 | ${BISON_SymbolParser_OUTPUTS} 25 | ${FLEX_SymbolScanner_OUTPUTS} 26 | ${SOURCES} 27 | ) 28 | 29 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 30 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 31 | 32 | 33 | -------------------------------------------------------------------------------- /symbol_reader/schematicssymbol.h: -------------------------------------------------------------------------------- 1 | #ifndef SCHEMATICSSYMBOL_H 2 | #define SCHEMATICSSYMBOL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "qschematics/qschematicspin.h" 9 | 10 | #include "symbolpin.h" 11 | 12 | namespace symbol { 13 | class SchematicsSymbol 14 | { 15 | public: 16 | SchematicsSymbol(QString n, QString p); 17 | void addRect(int x1, int y1, int x2, int y2); 18 | void addPin(std::string name, int index, int x, int y, int length, std::string orient, int tw, int th, int a, int b, std::string mode); 19 | 20 | QRectF createRect(); 21 | QVector createPins(QGraphicsItem*p); 22 | 23 | QString getName(); 24 | QString getPrefix(); 25 | 26 | private: 27 | QString m_name; 28 | QString m_prefix; 29 | 30 | qreal m_box_x1; 31 | qreal m_box_x2; 32 | qreal m_box_y1; 33 | qreal m_box_y2; 34 | 35 | QVector m_pins; 36 | }; 37 | } 38 | 39 | #endif // SCHEMATICSSYMBOL_H 40 | -------------------------------------------------------------------------------- /symbol_reader/symbol_reader.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | FLEXSOURCES += $$PWD/symbol_scanner.ll 5 | BISONSOURCES += $$PWD/symbol_parser.yy 6 | 7 | SOURCES += \ 8 | $$PWD/symboldata.cpp \ 9 | $$PWD/symbolscanner.cpp \ 10 | $$PWD/schematicssymbol.cpp \ 11 | $$PWD/symbolpin.cpp 12 | 13 | HEADERS += \ 14 | $$PWD/symboldata.h \ 15 | $$PWD/symbolscanner.h \ 16 | $$PWD/schematicssymbol.h \ 17 | $$PWD/symbolpin.h 18 | 19 | -------------------------------------------------------------------------------- /symbol_reader/symbolpin.cpp: -------------------------------------------------------------------------------- 1 | #include "symbolpin.h" 2 | 3 | namespace symbol { 4 | SymbolPin::SymbolPin(std::string name, int index, int x, int y, int length, std::string orient, int tw, int th, int a, int b, std::string mode) 5 | { 6 | m_name = QString::fromStdString(name); 7 | m_orient = QString::fromStdString(orient); 8 | m_mode = QString::fromStdString(mode); 9 | 10 | m_index = index; 11 | m_x = x; 12 | m_y = y; 13 | m_length = length; 14 | m_text_width = tw; 15 | m_text_heigth = th; 16 | m_a = a; 17 | m_b = b; 18 | } 19 | 20 | QSchematicsPin* SymbolPin::createSchematicsPin(QGraphicsItem* p) 21 | { 22 | return new QSchematicsPin(m_name, m_index, m_x, m_y, m_length, m_orient, m_text_width, m_text_heigth, m_a, m_b, m_mode, p); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /symbol_reader/symbolpin.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLPIN_H 2 | #define SYMBOLPIN_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "qschematics/qschematicspin.h" 9 | 10 | namespace symbol { 11 | class SymbolPin 12 | { 13 | public: 14 | SymbolPin(std::string name, int index, int x, int y, int length, std::string orient, int tw, int th, int a, int b, std::string mode); 15 | 16 | QSchematicsPin* createSchematicsPin(QGraphicsItem* p); 17 | 18 | private: 19 | QString m_name; 20 | QString m_orient; 21 | QString m_mode; 22 | 23 | int m_index; 24 | int m_x; 25 | int m_y; 26 | int m_length; 27 | int m_text_width; 28 | int m_text_heigth; 29 | int m_a; 30 | int m_b; 31 | }; 32 | } 33 | 34 | #endif // SYMBOLPIN_H 35 | -------------------------------------------------------------------------------- /symbol_reader/symbolscanner.cpp: -------------------------------------------------------------------------------- 1 | #include "symbol_parser.hpp" 2 | #include "symbolscanner.h" 3 | 4 | namespace symbol { 5 | SymbolScanner::SymbolScanner(std::istream* in, std::ostream* out) : 6 | symbolFlexLexer(in, out) 7 | { 8 | 9 | } 10 | } 11 | 12 | int symbolFlexLexer::yywrap() 13 | { 14 | return 1; 15 | } 16 | 17 | int symbolFlexLexer::yylex() 18 | { 19 | std::cerr << "in vcdFlexLexer::yylex() !" << std::endl; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /symbol_reader/symbolscanner.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLSCANNER_H 2 | #define SYMBOLSCANNER_H 3 | 4 | #ifndef __FLEX_LEXER_H 5 | #define yyFlexLexer symbolFlexLexer 6 | #include 7 | #undef yyFlexLexer 8 | #endif 9 | 10 | namespace symbol { 11 | class SymbolScanner : public symbolFlexLexer 12 | { 13 | public: 14 | SymbolScanner(std::istream* in = 0, std::ostream* out = &std::cout); 15 | int symbollex(symbol::SymbolParser::semantic_type*, SymbolData*); 16 | }; 17 | } 18 | 19 | #endif // SYMBOLSCANNER_H 20 | -------------------------------------------------------------------------------- /symbols/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "Symbols") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | symboleditor.cpp 14 | symboleditorscene.cpp 15 | symboleditorwidget.cpp 16 | ) 17 | 18 | add_library(${TARGET} SHARED 19 | ${SOURCES} 20 | ) 21 | 22 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 23 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 24 | 25 | -------------------------------------------------------------------------------- /symbols/symboleditor.cpp: -------------------------------------------------------------------------------- 1 | #include "symboleditor.h" 2 | 3 | SymbolEditor::SymbolEditor(QWidget *parent) : 4 | QGraphicsView(parent), 5 | editScene(new SymbolEditorScene(this)) 6 | { 7 | SymbolEditorScene *editScene; 8 | setScene(editScene); 9 | } 10 | -------------------------------------------------------------------------------- /symbols/symboleditor.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLEDITOR_H 2 | #define SYMBOLEDITOR_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "symboleditorscene.h" 10 | 11 | class SymbolEditor : public QGraphicsView 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | SymbolEditor(QWidget *parent = 0); 17 | 18 | SymbolEditorScene *editScene; 19 | }; 20 | 21 | #endif // SYMBOLEDITOR_H 22 | -------------------------------------------------------------------------------- /symbols/symboleditorscene.cpp: -------------------------------------------------------------------------------- 1 | #include "symboleditorscene.h" 2 | 3 | SymbolEditorScene::SymbolEditorScene(QObject *parent) 4 | { 5 | 6 | } 7 | 8 | SymbolEditorScene::SymbolEditorScene(const QRectF &sceneRect, QObject *parent) 9 | { 10 | 11 | } 12 | 13 | SymbolEditorScene::SymbolEditorScene(qreal x, qreal y, qreal width, qreal height, QObject *parent) 14 | { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /symbols/symboleditorscene.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLEDITORSCENE_H 2 | #define SYMBOLEDITORSCENE_H 3 | 4 | #include 5 | 6 | class SymbolEditorScene : public QGraphicsScene 7 | { 8 | public: 9 | SymbolEditorScene(QObject *parent = Q_NULLPTR); 10 | SymbolEditorScene(const QRectF &sceneRect, QObject *parent = Q_NULLPTR); 11 | SymbolEditorScene(qreal x, qreal y, qreal width, qreal height, QObject *parent = Q_NULLPTR); 12 | 13 | }; 14 | 15 | #endif // SYMBOLEDITORSCENE_H 16 | -------------------------------------------------------------------------------- /symbols/symboleditorwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "symboleditorwidget.h" 2 | 3 | SymbolEditorWidget::SymbolEditorWidget(QWidget *parent) : 4 | EditorWidget(parent) 5 | { 6 | 7 | } 8 | 9 | void SymbolEditorWidget::loadFile(QString) 10 | { 11 | 12 | } 13 | 14 | QString SymbolEditorWidget::getFilePath() 15 | { 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /symbols/symboleditorwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLEDITORWIDGET_H 2 | #define SYMBOLEDITORWIDGET_H 3 | 4 | #include "qeditor/editorwidget.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class SymbolEditorWidget : public EditorWidget 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit SymbolEditorWidget(QWidget *parent = nullptr); 16 | 17 | void loadFile(QString); 18 | QString getFilePath(); 19 | }; 20 | 21 | #endif // SYMBOLEDITORWIDGET_H 22 | -------------------------------------------------------------------------------- /symbols/symbols.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | SOURCES += \ 5 | $$PWD/symboleditorwidget.cpp \ 6 | $$PWD/symboleditor.cpp \ 7 | $$PWD/symboleditorscene.cpp 8 | 9 | HEADERS += \ 10 | $$PWD/symboleditorwidget.h \ 11 | $$PWD/symboleditor.h \ 12 | $$PWD/symboleditorscene.h 13 | 14 | -------------------------------------------------------------------------------- /tech/gencmap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | for r in range(0,256): 4 | print str(r)+'\t'+str(r)+'\t'+str(r)+'\t'+str(r) 5 | -------------------------------------------------------------------------------- /tech/osu018/osu018.magicrc: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------- 2 | # .magicrc startup file for OSU018 project under qflow 3 | #----------------------------------------------------- 4 | 5 | path sys +/usr/share/qflow/tech/osu018 6 | tech load SCN6M_SUBM.10 -noprompt 7 | # scalegrid 1 9 8 | set GND gnd 9 | set VDD vdd 10 | 11 | drc euclidean on 12 | drc off 13 | 14 | addpath digital 15 | 16 | -------------------------------------------------------------------------------- /tech/osu018/osu018.prm: -------------------------------------------------------------------------------- 1 | ; 2 | ; configuration file for osu018 (0.18um process) 3 | ; Note that these values are totally bogus! 4 | ; 5 | 6 | lambda 0.01 ; length scaling, microns (1 lambda = 1 centimicron) 7 | 8 | capga .0115 ; gate capacitance, pF/micron^2 9 | 10 | capda 0.0012 11 | capdp 0.0013 12 | cappda 0.00260 13 | cappdp 0.00090 14 | 15 | lowthresh 0.5 ; logic low threshold as a normalized voltage 16 | highthresh 0.5 ; logic high threshold as a normalized voltage 17 | 18 | cntpullup 0 ; irrelevant, cmos technology; no depletion transistors 19 | diffperim 0 ; don't include diffusion perimeters for sidewall cap. 20 | subparea 0 ; poly over transistor won't count as part pf bulk-poly cap. 21 | diffext 0 ; diffusion extension for each transistor 22 | 23 | resistance n-channel dynamic-low 2 0.4 1844.70 24 | resistance p-channel dynamic-high 6.2 0.4 1489.10 25 | resistance n-channel static 2 0.4 2203.94 26 | resistance p-channel static 6.2 0.4 1693.37 27 | -------------------------------------------------------------------------------- /tech/osu018/osu018_stdcells.gds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/tech/osu018/osu018_stdcells.gds -------------------------------------------------------------------------------- /tech/osu018/osu035_pads.gds2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/tech/osu018/osu035_pads.gds2 -------------------------------------------------------------------------------- /tech/osu035/osu035.magicrc: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------- 2 | # .magicrc startup file for OSU035 project under qflow 3 | #----------------------------------------------------- 4 | 5 | path sys +/usr/share/qflow/tech/osu035 6 | tech load SCN4M_SUBM.20 -noprompt 7 | scalegrid 1 4 8 | set GND gnd 9 | set VDD vdd 10 | 11 | drc euclidean on 12 | drc off 13 | 14 | addpath digital 15 | 16 | -------------------------------------------------------------------------------- /tech/osu035/osu035.prm: -------------------------------------------------------------------------------- 1 | ; 2 | ; configuration file for osu035 (0.35um process) 3 | ; Note that these values are totally bogus! 4 | ; 5 | 6 | lambda 0.01 ; length scaling, microns (1 lambda = 1 centimicron) 7 | 8 | capga .0115 ; gate capacitance, pF/micron^2 9 | 10 | capda 0.0012 11 | capdp 0.0013 12 | cappda 0.00260 13 | cappdp 0.00090 14 | 15 | lowthresh 0.5 ; logic low threshold as a normalized voltage 16 | highthresh 0.5 ; logic high threshold as a normalized voltage 17 | 18 | cntpullup 0 ; irrelevant, cmos technology; no depletion transistors 19 | diffperim 0 ; don't include diffusion perimeters for sidewall cap. 20 | subparea 0 ; poly over transistor won't count as part pf bulk-poly cap. 21 | diffext 0 ; diffusion extension for each transistor 22 | 23 | resistance n-channel dynamic-low 2 0.4 1844.70 24 | resistance p-channel dynamic-high 6.2 0.4 1489.10 25 | resistance n-channel static 2 0.4 2203.94 26 | resistance p-channel static 6.2 0.4 1693.37 27 | -------------------------------------------------------------------------------- /tech/osu035/osu035_pads.gds2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/tech/osu035/osu035_pads.gds2 -------------------------------------------------------------------------------- /tech/osu035/osu035_stdcells.gds2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/tech/osu035/osu035_stdcells.gds2 -------------------------------------------------------------------------------- /tech/osu050/osu050.magicrc: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------- 2 | # .magicrc startup file for OSU050 project under qflow 3 | #----------------------------------------------------- 4 | 5 | path sys +/usr/share/qflow/tech/osu050 6 | tech load SCN3ME_SUBM.30 -noprompt 7 | scalegrid 1 4 8 | set GND gnd 9 | set VDD vdd 10 | 11 | drc euclidean on 12 | drc off 13 | 14 | addpath digital 15 | 16 | -------------------------------------------------------------------------------- /tech/osu050/osu050.prm: -------------------------------------------------------------------------------- 1 | ; 2 | ; configuration file for osu050 (0.50um process) 3 | ; Note that these values are totally bogus! 4 | ; 5 | 6 | lambda 0.01 ; length scaling, microns (1 lambda = 1 centimicron) 7 | 8 | capga .0115 ; gate capacitance, pF/micron^2 9 | 10 | capda 0.0012 11 | capdp 0.0013 12 | cappda 0.00260 13 | cappdp 0.00090 14 | 15 | lowthresh 0.5 ; logic low threshold as a normalized voltage 16 | highthresh 0.5 ; logic high threshold as a normalized voltage 17 | 18 | cntpullup 0 ; irrelevant, cmos technology; no depletion transistors 19 | diffperim 0 ; don't include diffusion perimeters for sidewall cap. 20 | subparea 0 ; poly over transistor won't count as part pf bulk-poly cap. 21 | diffext 0 ; diffusion extension for each transistor 22 | 23 | resistance n-channel static 3 0.6 3858.26 24 | resistance p-channel static 8.7 0.6 2874.04 25 | resistance n-channel dynamic-high 3 0.6 7794.00 26 | resistance p-channel dynamic-low 8.7 0.6 6568.70 27 | -------------------------------------------------------------------------------- /tech/tech.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ./ls1u.toml 4 | ./ls1u.xml 5 | 6 | 7 | -------------------------------------------------------------------------------- /tech_reader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "TechReader") 2 | 3 | BISON_TARGET(TechParser tech_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/tech_parser.cpp) 4 | FLEX_TARGET(TechScanner tech_scanner.ll ${CMAKE_CURRENT_BINARY_DIR}/tech_scanner.cpp) 5 | ADD_FLEX_BISON_DEPENDENCY(TechScanner TechParser) 6 | 7 | include_directories( 8 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 9 | "${CMAKE_CURRENT_SOURCE_DIR}" 10 | "${CMAKE_CURRENT_BINARY_DIR}" 11 | ) 12 | 13 | set(SOURCES 14 | techdata.cpp 15 | techdesignrule.cpp 16 | techdesignrulespacing.cpp 17 | techscanner.cpp 18 | ) 19 | 20 | add_library(${TARGET} SHARED 21 | ${SOURCES} 22 | ${BISON_TechParser_OUTPUTS} 23 | ${FLEX_TechScanner_OUTPUTS} 24 | ) 25 | 26 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 27 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 28 | -------------------------------------------------------------------------------- /tech_reader/tech_reader.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | FLEXSOURCES += $$PWD/tech_scanner.ll 5 | BISONSOURCES += $$PWD/tech_parser.yy 6 | 7 | SOURCES += \ 8 | $$PWD/techdata.cpp \ 9 | $$PWD/techscanner.cpp \ 10 | $$PWD/techdesignrule.cpp \ 11 | $$PWD/techdesignrulespacing.cpp 12 | 13 | HEADERS += \ 14 | $$PWD/techdata.h \ 15 | $$PWD/techscanner.h \ 16 | $$PWD/techdesignrule.h \ 17 | $$PWD/techdesignrulespacing.h 18 | 19 | -------------------------------------------------------------------------------- /tech_reader/techdesignrule.h: -------------------------------------------------------------------------------- 1 | #ifndef TECHDESIGNRULE_H 2 | #define TECHDESIGNRULE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "techdesignrulespacing.h" 9 | 10 | class TechDesignRule 11 | { 12 | public: 13 | TechDesignRule(); 14 | void setName(QString); 15 | QString getName(); 16 | void setMinimumWidth(double i); 17 | void setWidthMessage(QString m); 18 | QString getWidthMessage(); 19 | void setSpacing(QString name, int d, QString message, bool touching_ok); 20 | QStringList getSpacingRules(); 21 | TechDesignRuleSpacing getSpacingRule(QString k); 22 | qreal getMinimumWidth(); 23 | 24 | private: 25 | qreal m_minWidth; 26 | QString m_name; 27 | QString m_widthMessage; 28 | QMap m_spacingList; 29 | }; 30 | 31 | #endif // TECHDESIGNRULE_H 32 | -------------------------------------------------------------------------------- /tech_reader/techdesignrulespacing.cpp: -------------------------------------------------------------------------------- 1 | #include "techdesignrulespacing.h" 2 | 3 | TechDesignRuleSpacing::TechDesignRuleSpacing() : 4 | b_touchingOK(false) 5 | { 6 | 7 | } 8 | 9 | void TechDesignRuleSpacing::setTouchingOK(bool t) 10 | { 11 | b_touchingOK = t; 12 | } 13 | 14 | QString TechDesignRuleSpacing::getMaterial() 15 | { 16 | return m_material; 17 | } 18 | 19 | void TechDesignRuleSpacing::setMaterial(QString m) 20 | { 21 | m_material = m; 22 | } 23 | 24 | void TechDesignRuleSpacing::setSpacing(int i) 25 | { 26 | m_spacing = i; 27 | } 28 | 29 | int TechDesignRuleSpacing::getSpacing() 30 | { 31 | return m_spacing; 32 | } 33 | 34 | bool TechDesignRuleSpacing::getTouchingOK() 35 | { 36 | return b_touchingOK; 37 | } 38 | -------------------------------------------------------------------------------- /tech_reader/techdesignrulespacing.h: -------------------------------------------------------------------------------- 1 | #ifndef TECHDESIGNRULESPACING_H 2 | #define TECHDESIGNRULESPACING_H 3 | 4 | #include 5 | 6 | class TechDesignRuleSpacing 7 | { 8 | public: 9 | TechDesignRuleSpacing(); 10 | void setTouchingOK(bool); 11 | void setMaterial(QString m); 12 | void setSpacing(int i); 13 | int getSpacing(); 14 | bool getTouchingOK(); 15 | QString getMaterial(); 16 | private: 17 | bool b_touchingOK; 18 | int m_spacing; 19 | QString m_material; 20 | }; 21 | 22 | #endif // TECHDESIGNRULESPACING_H 23 | -------------------------------------------------------------------------------- /tech_reader/techscanner.cpp: -------------------------------------------------------------------------------- 1 | #include "tech_parser.hpp" 2 | #include "techscanner.h" 3 | 4 | namespace tech { 5 | TechScanner::TechScanner(std::istream* in, std::ostream* out) : 6 | techFlexLexer(in, out) 7 | { 8 | 9 | } 10 | } 11 | 12 | int techFlexLexer::yywrap() 13 | { 14 | return 1; 15 | } 16 | 17 | int techFlexLexer::yylex() 18 | { 19 | std::cerr << "in vcdFlexLexer::yylex() !" << std::endl; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /tech_reader/techscanner.h: -------------------------------------------------------------------------------- 1 | #ifndef TECHSCANNER_H 2 | #define TECHSCANNER_H 3 | 4 | #ifndef __FLEX_LEXER_H 5 | #define yyFlexLexer techFlexLexer 6 | #include 7 | #undef yyFlexLexer 8 | #endif 9 | 10 | namespace tech { 11 | class TechScanner : public techFlexLexer 12 | { 13 | public: 14 | TechScanner(std::istream* in = 0, std::ostream* out = &std::cout); 15 | int techlex(tech::TechParser::semantic_type*, TechData*); 16 | }; 17 | } 18 | 19 | #endif // TECHSCANNER_H 20 | -------------------------------------------------------------------------------- /test_project/qtflow_test.pro: -------------------------------------------------------------------------------- 1 | [General] 2 | layout=layout 3 | process=osu018 4 | projectType=asic_mixed 5 | search_dirs=source 6 | simulation_script=simulation.py 7 | sourcedir=/source 8 | synthesis=synthesis 9 | synthesis_script=synthesis.py 10 | technology=scmos 11 | testbench=counter_test 12 | toplevel=counter 13 | -------------------------------------------------------------------------------- /test_project/source/counter.sch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leviathanch/qtflow/226edf379d2b17d9c8f0901574f816b4390a38cc/test_project/source/counter.sch -------------------------------------------------------------------------------- /test_project/source/counter.v: -------------------------------------------------------------------------------- 1 | module counter(q,clk,clr); 2 | input clk; 3 | input clr; 4 | output[3:0] q; 5 | reg[3:0] q; 6 | always @(posedge clk) 7 | if(clr==1) 8 | q<=4'b1000; 9 | else 10 | begin 11 | q[3]<=q[0]; 12 | q[2]<=q[3]; 13 | q[1]<=q[2]; 14 | q[0]<=q[1]; 15 | end 16 | endmodule 17 | -------------------------------------------------------------------------------- /test_project/source/counter_test.v: -------------------------------------------------------------------------------- 1 | `include "counter.v" 2 | 3 | `timescale 1ns/1ps 4 | 5 | module counter_test(); 6 | reg clk_tb,clr_tb; 7 | wire [3:0]q_tb; 8 | counter dut1(q_tb,clk_tb,clr_tb); 9 | initial 10 | begin 11 | clr_tb=1'b0; 12 | #50 clr_tb=1'b1; 13 | #100 clr_tb=1'b0; 14 | 15 | $dumpfile("counter_test.vcd"); 16 | 17 | $dumpvars(0,counter_test); 18 | 19 | # 1501 $finish; 20 | end 21 | always 22 | begin 23 | #50 clk_tb=1'b1; 24 | #50 clk_tb=1'b0; 25 | end 26 | endmodule 27 | -------------------------------------------------------------------------------- /tests/layout1.mag: -------------------------------------------------------------------------------- 1 | magic 2 | magscale 1 2 3 | timestamp 1522770795637 4 | << contact >> 5 | rect 2 9 4 11 6 | rect 2 13 4 15 7 | rect 18 21 20 23 8 | rect 6 9 8 11 9 | rect 6 13 8 15 10 | rect 24 21 26 23 11 | rect 12 9 14 11 12 | rect 12 13 14 15 13 | rect 28 21 30 23 14 | rect 18 9 20 11 15 | rect 18 13 20 15 16 | rect 18 17 20 19 17 | rect 24 9 26 11 18 | rect 24 13 26 15 19 | rect 24 17 26 19 20 | rect 28 9 30 11 21 | rect 28 13 30 15 22 | rect 28 17 30 19 23 | rect 17 3 19 5 24 | rect 13 3 15 5 25 | << metal1 >> 26 | rect 5 3 5 4 27 | rect 10 5 10 6 28 | rect 18 14 18 15 29 | rect 30 1 30 1 30 | rect 29 1 29 1 31 | rect 30 21 30 22 32 | rect 11 1 21 6 33 | rect 20 0 20 0 34 | rect 1 1 9 28 35 | rect 11 8 21 28 36 | rect 23 1 31 28 37 | << n_plus_select >> 38 | rect 3 4 3 4 39 | rect 27 8 31 24 40 | rect 5 8 15 16 41 | << n_well >> 42 | rect 1 8 15 16 43 | << p_plus_select >> 44 | rect 0 9 0 10 45 | rect 17 8 27 24 46 | rect 1 8 5 16 47 | << p_well >> 48 | rect 17 8 31 24 49 | << poly >> 50 | rect 9 1 23 8 51 | rect 9 8 11 16 52 | rect 21 8 23 24 53 | << via1 >> 54 | rect 2 25 4 27 55 | rect 6 25 8 27 56 | rect 2 3 4 5 57 | rect 6 3 8 5 58 | rect 24 3 26 5 59 | rect 28 3 30 5 60 | rect 24 25 26 27 61 | rect 28 25 30 27 62 | rect 13 25 15 27 63 | rect 17 25 19 27 64 | << end >> 65 | -------------------------------------------------------------------------------- /vcd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "VCD") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | include_directories( 7 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ) 11 | 12 | set(SOURCES 13 | vcdsignaltreeitem.cpp 14 | vcdsignaltreemodel.cpp 15 | vcdsignalview.cpp 16 | vcdsignalviewtreeitem.cpp 17 | vcdsignalviewtreemodel.cpp 18 | vcdtreeitem.cpp 19 | vcdtreemodel.cpp 20 | vcdviewgraphicsitembus.cpp 21 | vcdviewgraphicsitembussubsignal.cpp 22 | vcdviewgraphicsitem.cpp 23 | vcdviewgraphicsitemsignal.cpp 24 | vcdviewgraphicsitemtimescale.cpp 25 | ) 26 | 27 | add_library(${TARGET} SHARED 28 | ${SOURCES} 29 | ) 30 | 31 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 32 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 33 | 34 | -------------------------------------------------------------------------------- /vcd/vcd.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | SOURCES += \ 5 | $$PWD/vcdtreemodel.cpp \ 6 | $$PWD/vcdtreeitem.cpp \ 7 | $$PWD/vcdsignaltreemodel.cpp \ 8 | $$PWD/vcdsignaltreeitem.cpp \ 9 | $$PWD/vcdsignalviewtreemodel.cpp \ 10 | $$PWD/vcdsignalviewtreeitem.cpp \ 11 | $$PWD/vcdsignalview.cpp \ 12 | $$PWD/vcdviewgraphicsitemsignal.cpp \ 13 | $$PWD/vcdviewgraphicsitembus.cpp \ 14 | $$PWD/vcdviewgraphicsitemtimescale.cpp \ 15 | $$PWD/vcdviewgraphicsitembussubsignal.cpp \ 16 | $$PWD/vcdviewgraphicsitem.cpp 17 | 18 | HEADERS += \ 19 | $$PWD/vcdtreemodel.h \ 20 | $$PWD/vcdtreeitem.h \ 21 | $$PWD/vcdsignaltreemodel.h \ 22 | $$PWD/vcdsignaltreeitem.h \ 23 | $$PWD/vcdsignalviewtreemodel.h \ 24 | $$PWD/vcdsignalviewtreeitem.h \ 25 | $$PWD/vcdsignalview.h \ 26 | $$PWD/vcdviewgraphicsitemsignal.h \ 27 | $$PWD/vcdviewgraphicsitembus.h \ 28 | $$PWD/vcdviewgraphicsitemtimescale.h \ 29 | $$PWD/vcdviewgraphicsitembussubsignal.h \ 30 | $$PWD/vcdviewgraphicsitem.h 31 | 32 | -------------------------------------------------------------------------------- /vcd/vcdparse.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "vcd_loader.hpp" 4 | #include "vcd_data.hpp" 5 | -------------------------------------------------------------------------------- /vcd/vcdsignaltreeitem.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDSIGNALTREEITEM_H 2 | #define VCDSIGNALTREEITEM_H 3 | 4 | #include 5 | #include 6 | 7 | namespace vcd { 8 | class Var; 9 | } 10 | 11 | class VcdSignalTreeItem 12 | { 13 | public: 14 | explicit VcdSignalTreeItem(const QList &data, VcdSignalTreeItem *parentItem = 0); 15 | ~VcdSignalTreeItem(); 16 | 17 | void appendChild(vcd::Var var); 18 | 19 | VcdSignalTreeItem *child(int row); 20 | int childCount() const; 21 | int columnCount() const; 22 | QVariant data(int column) const; 23 | int row() const; 24 | VcdSignalTreeItem *parentItem(); 25 | 26 | private: 27 | QList m_childItems; 28 | QMap m_childItemMap; 29 | QList m_itemData; 30 | VcdSignalTreeItem *m_parentItem; 31 | }; 32 | 33 | #endif // VCDSIGNALTREEITEM_H 34 | -------------------------------------------------------------------------------- /vcd/vcdsignalviewtreeitem.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDSIGNALVIEWTREEITEM_H 2 | #define VCDSIGNALVIEWTREEITEM_H 3 | 4 | #include 5 | #include 6 | 7 | namespace vcd { 8 | class Var; 9 | } 10 | 11 | class VcdSignalViewTreeItem 12 | { 13 | public: 14 | explicit VcdSignalViewTreeItem(const QList &data, VcdSignalViewTreeItem *parentItem = 0); 15 | ~VcdSignalViewTreeItem(); 16 | 17 | void appendChild(vcd::Var var); 18 | void appendChildItem(VcdSignalViewTreeItem *m); 19 | 20 | VcdSignalViewTreeItem *child(int row); 21 | int childCount() const; 22 | int columnCount() const; 23 | QVariant data(int column) const; 24 | int row() const; 25 | VcdSignalViewTreeItem *parentItem(); 26 | 27 | bool isBus(QString); 28 | QVector getBus(QString s); 29 | 30 | private: 31 | QList m_childItems; 32 | QList m_itemData; 33 | VcdSignalViewTreeItem *m_parentItem; 34 | }; 35 | 36 | #endif // VCDSIGNALVIEWTREEITEM_H 37 | -------------------------------------------------------------------------------- /vcd/vcdtreeitem.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "vcdtreeitem.h" 4 | 5 | VcdTreeItem::VcdTreeItem(const QList &data, VcdTreeItem *parent) 6 | { 7 | m_parentItem = parent; 8 | m_itemData = data; 9 | } 10 | 11 | VcdTreeItem::~VcdTreeItem() 12 | { 13 | qDeleteAll(m_childItems); 14 | } 15 | 16 | VcdTreeItem * VcdTreeItem::appendChild(QString key) 17 | { 18 | QList data; 19 | 20 | if(m_childItemMap.contains(key)) { 21 | return m_childItemMap[key]; 22 | } else { 23 | data << key; 24 | m_childItemMap[key] = new VcdTreeItem(data,this); 25 | m_childItems.append(m_childItemMap[key]); 26 | return m_childItemMap[key]; 27 | } 28 | } 29 | 30 | VcdTreeItem *VcdTreeItem::child(int row) 31 | { 32 | return m_childItems.value(row); 33 | } 34 | 35 | int VcdTreeItem::childCount() const 36 | { 37 | return m_childItems.count(); 38 | } 39 | 40 | int VcdTreeItem::columnCount() const 41 | { 42 | return m_itemData.count(); 43 | } 44 | 45 | QVariant VcdTreeItem::data(int column) const 46 | { 47 | return m_itemData.value(column); 48 | } 49 | 50 | VcdTreeItem *VcdTreeItem::parentItem() 51 | { 52 | return m_parentItem; 53 | } 54 | 55 | int VcdTreeItem::row() const 56 | { 57 | if (m_parentItem) 58 | return m_parentItem->m_childItems.indexOf(const_cast(this)); 59 | 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /vcd/vcdtreeitem.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDVcdTreeItem_H 2 | #define VCDVcdTreeItem_H 3 | 4 | #include 5 | #include 6 | 7 | class VcdTreeItem 8 | { 9 | public: 10 | explicit VcdTreeItem(const QList &data, VcdTreeItem *parentItem = 0); 11 | ~VcdTreeItem(); 12 | 13 | VcdTreeItem * appendChild(QString key); 14 | 15 | VcdTreeItem *child(int row); 16 | int childCount() const; 17 | int columnCount() const; 18 | QVariant data(int column) const; 19 | int row() const; 20 | VcdTreeItem *parentItem(); 21 | 22 | private: 23 | QList m_childItems; 24 | QMap m_childItemMap; 25 | QList m_itemData; 26 | VcdTreeItem *m_parentItem; 27 | }; 28 | 29 | #endif // VCDVcdTreeItem_H 30 | -------------------------------------------------------------------------------- /vcd/vcdtreemodel.h: -------------------------------------------------------------------------------- 1 | #ifndef VCD_SST_TREE_MODEL_H 2 | #define VCD_SST_TREE_MODEL_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | namespace vcd { 11 | class VcdData; 12 | class Var; 13 | } 14 | 15 | class VcdTreeItem; 16 | 17 | class VcdTreeModel : public QAbstractItemModel 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | explicit VcdTreeModel(const vcd::VcdData &data, QObject *parent = 0); 23 | ~VcdTreeModel(); 24 | 25 | QVariant data(const QModelIndex &index, int role) const override; 26 | Qt::ItemFlags flags(const QModelIndex &index) const override; 27 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 28 | QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; 29 | QModelIndex parent(const QModelIndex &index) const override; 30 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 31 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; 32 | 33 | private: 34 | VcdTreeItem *rootItem; 35 | 36 | protected: 37 | void buildTree(std::vector); 38 | 39 | }; 40 | 41 | #endif // VCD_SST_TREE_MODEL_H 42 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitem.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDVIEWGRAPHICSITEM_H 2 | #define VCDVIEWGRAPHICSITEM_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "vcd_reader/vcd_data.hpp" 10 | 11 | class VcdViewGraphicsItem : public QObject, public QGraphicsItem 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit VcdViewGraphicsItem(vcd::Var var, QGraphicsItem *parent = nullptr); 17 | 18 | QRectF boundingRect() const; 19 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR); 20 | 21 | qreal height(); 22 | qreal width(); 23 | 24 | bool contains(const QPointF &point) const; 25 | 26 | QString getLongName(); 27 | 28 | protected: 29 | void addTime(qreal time); 30 | 31 | signals: 32 | void deleteInstance(VcdViewGraphicsItem*); 33 | 34 | public slots: 35 | void deleteMe(); 36 | 37 | private: 38 | // bounding rect: 39 | qreal m_height; 40 | qreal m_width; 41 | 42 | qreal m_lastTime; 43 | qreal m_firstTime; 44 | bool m_firstTimeSet; 45 | 46 | QString m_name; 47 | QString m_long_name; 48 | 49 | QGraphicsSimpleTextItem *sigLabel; 50 | QGraphicsRectItem *sigFrame; 51 | }; 52 | 53 | #endif // VCDVIEWGRAPHICSITEM_H 54 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitembus.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDVIEWGRAPHICSITEMBUS_H 2 | #define VCDVIEWGRAPHICSITEMBUS_H 3 | 4 | #include "vcdviewgraphicsitem.h" 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #define RAISE_TIME 10 11 | 12 | class VcdViewGraphicsItemBus : public VcdViewGraphicsItem 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit VcdViewGraphicsItemBus(vcd::Var var, vcd::TimeBusValues values, QGraphicsItem *parent = nullptr); 18 | 19 | protected: 20 | void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); 21 | }; 22 | 23 | #endif // VCDVIEWGRAPHICSITEMBUS_H 24 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitembussubsignal.cpp: -------------------------------------------------------------------------------- 1 | #include "vcdviewgraphicsitembussubsignal.h" 2 | 3 | VcdViewGraphicsItemBusSubSignal::VcdViewGraphicsItemBusSubSignal(vcd::Var var, vcd::TimeBusValues values, QGraphicsItem *parent) : 4 | VcdViewGraphicsItem(var,parent) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitembussubsignal.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDVIEWGRAPHICSITEMBUSSUBSIGNAL_H 2 | #define VCDVIEWGRAPHICSITEMBUSSUBSIGNAL_H 3 | 4 | #include "vcdviewgraphicsitem.h" 5 | 6 | class VcdViewGraphicsItemBusSubSignal : public VcdViewGraphicsItem 7 | { 8 | public: 9 | explicit VcdViewGraphicsItemBusSubSignal(vcd::Var var, vcd::TimeBusValues values, QGraphicsItem *parent = nullptr); 10 | 11 | }; 12 | 13 | #endif // VCDVIEWGRAPHICSITEMBUSSUBSIGNAL_H 14 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitemsignal.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDVIEWGRAPHICSITEMSIGNAL_H 2 | #define VCDVIEWGRAPHICSITEMSIGNAL_H 3 | 4 | #include "vcdviewgraphicsitem.h" 5 | 6 | #include 7 | #include 8 | 9 | class VcdViewGraphicsItemSignal : public VcdViewGraphicsItem 10 | { 11 | public: 12 | explicit VcdViewGraphicsItemSignal(vcd::Var var, vcd::TimeValues values, QGraphicsItem *parent = nullptr); 13 | 14 | protected: 15 | void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); 16 | 17 | private: 18 | bool m_isFirstValue; 19 | }; 20 | 21 | #endif // VCDVIEWGRAPHICSITEMSIGNAL_H 22 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitemtimescale.cpp: -------------------------------------------------------------------------------- 1 | #include "vcdviewgraphicsitemtimescale.h" 2 | 3 | VcdViewGraphicsItemTimeScale::VcdViewGraphicsItemTimeScale(QGraphicsItem *parent) : 4 | QGraphicsItem(parent) 5 | { 6 | } 7 | 8 | QRectF VcdViewGraphicsItemTimeScale::boundingRect() const 9 | { 10 | //return QRect(m_xmin,m_ymin,m_xmax-m_xmin,m_ymax-m_ymin); 11 | } 12 | 13 | void VcdViewGraphicsItemTimeScale::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) 14 | { 15 | } 16 | 17 | -------------------------------------------------------------------------------- /vcd/vcdviewgraphicsitemtimescale.h: -------------------------------------------------------------------------------- 1 | #ifndef VCDVIEWGRAPHICSITEMTIMESCALE_H 2 | #define VCDVIEWGRAPHICSITEMTIMESCALE_H 3 | 4 | #include 5 | #include 6 | 7 | class VcdViewGraphicsItemTimeScale : public QGraphicsItem 8 | { 9 | public: 10 | explicit VcdViewGraphicsItemTimeScale(QGraphicsItem *parent = nullptr); 11 | 12 | QRectF boundingRect() const; 13 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR); 14 | 15 | signals: 16 | 17 | public slots: 18 | 19 | 20 | }; 21 | 22 | #endif // VCDVIEWGRAPHICSITEMTIMESCALE_H 23 | -------------------------------------------------------------------------------- /vcd_reader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET "VCDReader") 2 | 3 | set (CMAKE_AUTOMOC ON) 4 | set (CMAKE_INCLUDE_CURRENT_DIR ON) 5 | 6 | BISON_TARGET(VCDParser vcd_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/vcd_parser.cpp) 7 | FLEX_TARGET(VCDScanner vcd_scanner.ll ${CMAKE_CURRENT_BINARY_DIR}/vcd_scanner.cpp) 8 | ADD_FLEX_BISON_DEPENDENCY(VCDScanner VCDParser) 9 | 10 | include_directories( 11 | "${CMAKE_CURRENT_SOURCE_DIR}/.." 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ) 15 | 16 | set(SOURCES 17 | vcd_data.cpp 18 | vcd_loader.cpp 19 | ) 20 | 21 | add_library(${TARGET} SHARED 22 | ${BISON_VCDParser_OUTPUTS} 23 | ${FLEX_VCDScanner_OUTPUTS} 24 | ${SOURCES} 25 | ) 26 | 27 | target_link_libraries(${TARGET} ${QT5_LIBRARIES}) 28 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) 29 | 30 | -------------------------------------------------------------------------------- /vcd_reader/vcd_data_fwd.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace sdfparse { 4 | class VcdData; 5 | } 6 | -------------------------------------------------------------------------------- /vcd_reader/vcd_error.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "location.hh" 6 | 7 | namespace vcd { 8 | 9 | class ParseError : public std::runtime_error { 10 | public: 11 | ParseError(const std::string& msg, location new_loc) 12 | : std::runtime_error(msg) 13 | , loc_(new_loc) 14 | {} 15 | 16 | location loc() { return loc_; } 17 | 18 | private: 19 | location loc_; 20 | }; 21 | 22 | } //namespace 23 | -------------------------------------------------------------------------------- /vcd_reader/vcd_reader.pri: -------------------------------------------------------------------------------- 1 | # This was needed to work around "number of sections exceeded object file format limit" linker error 2 | win32:QMAKE_CXXFLAGS += /bigobj 3 | 4 | FLEXSOURCES += $$PWD/vcd_scanner.ll 5 | BISONSOURCES += $$PWD/vcd_parser.yy 6 | 7 | SOURCES += \ 8 | $$PWD/vcd_data.cpp \ 9 | $$PWD/vcd_loader.cpp 10 | 11 | HEADERS += \ 12 | $$PWD/vcd_data_fwd.hpp \ 13 | $$PWD/vcd_data.hpp \ 14 | $$PWD/vcd_error.hpp \ 15 | $$PWD/vcd_lexer.hpp \ 16 | $$PWD/vcd_loader.hpp 17 | 18 | --------------------------------------------------------------------------------