Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gnucap:user:netlist_import_and_export:geda [2025/05/14 05:54]
felixs describe net override handling
gnucap:user:netlist_import_and_export:geda [2025/12/04 04:26] (current)
felixs [Parameter declarations] add example
Line 76: Line 76:
 ==== Parameter declarations ==== ==== Parameter declarations ====
  
-A parameter in a schematic may be declared using an instance of parameter-1.sym, which carries the ''symbol=schematic-parameter'' attribute. It corresponds to a parameter declaration in a Verilog module.+A parameter in a schematic may be declared using an instance of parameter-1.sym, which carries the ''symbol=schematic-parameter'' attribute. An instance of it,
  
 +    C 46400 43900 1 0 0 parameter-1.sym
 +    {
 +    T 47600 44300 5 10 1 1 0 0 1
 +    refdes=bias
 +    T 46500 44000 5 10 1 0 0 0 1
 +    default_value=17
 +    T 46400 44000 5 10 1 0 0 0 1
 +    verilog_type=real
 +    }
 +
 +corresponds to a parameter declaration in a Verilog module, optionally with metadata, as follows.
 +
 +    (* S0_x=46400, S0_y=43900, geda_symbol="parameter-1.sym" [more geda_metadata] *) parameter bias = 17.;
 +
 +Additional gEDA attributes such as ''verilog_type'' may be used to carry unsupported data. This needs addressing in gEDA or Lepton and is beyond the scope of the translation.
 +
 +    (* S0_x=46400, S0_y=43900, geda_symbol="parameter-1.sym" [more geda_metadata] *) parameter real bias = 17.;
 +
 +Multiple declarations in a single statement
 +
 +    parameter real a=0, b=1, c=2;
 +
 +are not supported in gEDA, but may be unrolled into multiple components.
 ==== The value attribute ==== ==== The value attribute ====
  
Line 154: Line 177:
 In older schematics ad-hoc solutions and workarounds indicating port connections can be found. For example the ''device=spice-IO'' attribute has been in wide use. Some heuristics cover some of these, but they should not be relied on. In older schematics ad-hoc solutions and workarounds indicating port connections can be found. For example the ''device=spice-IO'' attribute has been in wide use. Some heuristics cover some of these, but they should not be relied on.
  
 +===== Non-circuit items =====
  
 +==== Text ====
 +
 +Text objects store a given positive number of lines. We can store lines in a string attribute. Here, a line ends with a newline character.
 +The x/y coordinates refer to the left end of the baseline of the first line of text, and this may require some guesswork. Other attributes are named as in the manual.
 +Identifiers for text are arbitrary, but assigned uniquely. Text items such as
 +
 +  T 1000 100 9 10 1 0 0 0 1
 +  AAAA
 +  T 2000 100 9 10 1 0 0 0 2
 +  BBBB
 +  BBBB
 +  T 3000 100 9 10 1 0 0 0 1
 +  CCCC
 +  
 +may become
  
 +  (* S0_text="AAAA\n", S0_x=1000, S0_y=100, geda_color=9, geda_size=10, geda_visibility=1, geda_show_name_value=0, geda_angle=0, geda_alignment=0 *) S__text #() geda_text_1 ();
 +  (* S0_text="BBBB\nBBBB\n", S0_x=2000, S0_y=314, geda_color=9, geda_size=10, geda_visibility=1, geda_show_name_value=0, geda_angle=0, geda_alignment=0 *) S__text #() geda_text_2 ();
 +  (* S0_text="CCCC\n", S0_x=3000, S0_y=100, geda_color=9, geda_size=10, geda_visibility=1, geda_show_name_value=0, geda_angle=0, geda_alignment=0 *) S__text #() geda_text_3 ();.
gnucap/user/netlist_import_and_export/geda.1747220058.txt.gz · Last modified: 2025/05/14 05:54 by felixs
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki