Differences

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

Link to this comparison view

gnucap:user:netlist_import_and_export:geometry [2025/05/12 06:31] (current)
felixs move, add Units
Line 1: Line 1:
 +====== Schematic geometry ======
  
 +Verilog-AMS defines hierarchical parameters ''$xposition'' and ''$yposition'' as well as ''$angle'' to express physical location and orientation as on a wafer or PCB. According to the LRM, ''$angle'' is supposed to mean "counter-clockwise".
 +
 +Our interpretation of counter-clockwise follows when choosing the x axis pointing to the right, and the y axis pointing upwards. Now a 90 degree rotation moves the x axis to the y axis, in other words ''(x,y)=(1,0)'' to ''(0,1)''. Equivalently, the y axis may be thought of as the imaginary axis in the complex plane. Then, rotation by 2\pi\phi corresponds to multiplication by exp(2\pi\phi * i), with the imaginary unit i.
 +
 +This seems relevant when moving on to schematics. Since Verilog-AMS is governed by physical semantics, we retain this choice of angle and coordinates also for schematic drawings, even though other coordinate systems are in common use.
 +
 +If you prefer a y axis pointing downwards, you may use a flipped coordinate system locally, as within the body of the following module.
 +As expected, any uses of ''angle'' inside the body will be applied before the final vflip.
 +
 +<code>
 +(* S0_vflip=-1 *)
 +module upside_down_module();
 +  [..]
 +endmodule  
 +</code>
 +
 +====== Schematic Units ======
 +
 +The distance unit in a schematic is 1 meter. Some schematic editors use pixels on a screen or similar concepts. We use a scaling attribute to allow tools to interpret coordinates in their own way.
 +
 +<code>
 +(* S0_scale=1000000 *)
 +module many_pixel_module();
 +  [..] // 1000000 is 1 meter.
 +endmodule  
 +</code>
gnucap/user/netlist_import_and_export/geometry.txt · Last modified: 2025/05/12 06:31 by felixs
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki