Rewrite CONTRIBUTING.md to add changes relative to dev. Add small changes from orbe7947.

This commit is contained in:
Matt Guthaus 2017-12-12 15:50:45 -08:00
parent 18e748f3c0
commit e3a6c1ac6b
5 changed files with 51 additions and 34 deletions

View File

@ -53,7 +53,17 @@ the tests on your contributions before they will be accepted.
if you previously added the one with the git@github that required
authentication.
5. Make your own branch. The number one rule is to put each piece of
5. Start with dev:
```
git checkout dev
```
"dev" is the name of the branch that
is the development version. You should submit all contributions as changes
to the dev branch. "master" is the name of the branch that is the release version of the
code (in your fork of the repository). You can check out the released
code with "git checkout master”.
6. Make your own branch from dev. The number one rule is to put each piece of
work on its own branch:
```
git checkout -b useful-branch-name
@ -63,61 +73,56 @@ the tests on your contributions before they will be accepted.
git branch useful-branch-name
git checkout useful-branch-name
```
"master" is the name of the branch that is the release version of the
code (in your fork of the repository). You can check out the released
code with "git checkout master" or go back to your ranch with
"gitcheckout useful-branch-name".
6. Edit your code and make commits like normal:
7. Edit your code and make commits:
```
git add <new files>
<edit files>
git add <new files>
git commit -m "Useful comment" <files changed>
```
OR (sparingly, to commit all changes):
```
git status
<check that all the changed files are correct and should be commited>
<check that all the changed files are correct and should be committed>
git commit -a -m "Useful comment"
```
Run the unit tests entirely. Fix all bugs.
7. After you are done (or while you are editing and you see changes in
MY master branch) make sure you have the most recent from MY master
and merge any changes. Pull the updated copy from MY master branch in
8. After you are done (or while you are editing and you see changes in
MY dev branch) make sure you have the most recent from MY dev
and merge any changes. Pull the updated copy from MY master dev in
MY repository:
```
git pull upstream master
git pull upstream dev
```
This is important because we may have had other updates that conflict
with your changes and you must resolve them with current state of
master (the released, working code). You may have to merge changes if
they overlap your changes, so do this often to avoid the problem. You
now need to push this to the master of YOUR forked repository as well:
```
git push origin master
```
if you are on your master branch. Otherwise, just git push.
8. Push your branch to YOUR repository:
9. Merge the changes from dev into your branch
```
git merge dev
```
10. After you are done, rebase your branch to minimize the number of commits if you
had a lot. I prefer a single commit that you contribute. After this,
push your branch to YOUR repository:
```
git rebase dev
git push -u origin useful-branch-name
```
Remember origin is your copy on github and useful-branch-name is the
branch that you made to contain all your changes.
The -u flag links this branch with the remote one, so that in the
future, you can simply type git push origin.
future, you can simply type git push origin. Do not rebase after you push
the branch!
9. When you are done, go to GitHub and you will see a button to notify
11. When you are done, go to GitHub and you will see a button to notify
me. Press the button and it will notify me of your pushed branch.
This will have you fill in a form for the contribution that gets sent
to me.
10. I will review the request and may have you fix stuff if the tests
don't pass, you didn't merge all my changes in master from other
12. I will review the request and may have you fix stuff if the tests
don't pass, you didn't merge all my changes in dev from other
contributions, or your style of code is bad.
11. Go back to step 3 for your next contribution. Remember, you can
13. Go back to step 3 for your next contribution. Remember, you can
push/pull work to your repository all the time and can pull from my
master as well. Make sure to add large features so that You don't have
dev as well. Make sure to add large features so that You don't have
to add lots of pull requests.

View File

@ -1,5 +1,6 @@
import design
import debug
import utils
from tech import drc
from vector import vector
@ -53,15 +54,15 @@ class contact(design.design):
# FIME break this up
self.first_layer_horizontal_enclosure = max((drc["minwidth_{0}".format(self.first_layer_name)] - self.contact_array_width) / 2,
drc["{0}_enclosure_{1}".format(self.first_layer_name, self.via_layer_name)])
self.first_layer_vertical_enclosure = max((drc["minarea_{0}".format(self.first_layer_name)]
/ (self.contact_array_width + 2 * self.first_layer_horizontal_enclosure) - self.contact_array_height) / 2,
self.first_layer_vertical_enclosure = max(utils.ceil((drc["minarea_{0}".format(self.first_layer_name)]
/ (self.contact_array_width + 2 * self.first_layer_horizontal_enclosure) - self.contact_array_height) / 2),
(drc["minheight_{0}".format(self.first_layer_name)] - self.contact_array_height) / 2,
drc["{0}_extend_{1}".format(self.first_layer_name, self.via_layer_name)])
self.second_layer_horizontal_enclosure = max((drc["minwidth_{0}".format(self.second_layer_name)] - self.contact_array_width) / 2,
drc["{0}_enclosure_{1}".format(self.second_layer_name, self.via_layer_name)])
self.second_layer_vertical_enclosure = max((drc["minarea_{0}".format(self.second_layer_name)]
/ (self.contact_array_width + 2 * self.second_layer_horizontal_enclosure) - self.contact_array_height) / 2,
self.second_layer_vertical_enclosure = max(utils.ceil((drc["minarea_{0}".format(self.second_layer_name)]
/ (self.contact_array_width + 2 * self.second_layer_horizontal_enclosure) - self.contact_array_height) / 2),
(drc["minheight_{0}".format(self.second_layer_name)] - self.contact_array_height) / 2,
drc["{0}_extend_{1}".format(self.second_layer_name, self.via_layer_name)])
# offset for the via array

View File

@ -126,7 +126,7 @@ class Gds2writer:
if (len(self.layoutObject.info["libraryName"]) % 2 != 0):
libraryName = self.layoutObject.info["libraryName"] + "\0"
else:
libraryName = self.layoutObject.info["libraryName"] + "\0"
libraryName = self.layoutObject.info["libraryName"]
self.writeRecord(idBits+libraryName)
## reference libraries
if("referenceLibraries" in self.layoutObject.info):

View File

@ -696,6 +696,9 @@ class VlsiLayout:
"""
pin_boundaries=self.getAllPinShapesInStructureList(coordinate, layer)
if len(pin_boundaries) == 0:
debug.warning("Did not find pin on layer {0} at coordinate {1}".format(layer, coordinate))
# sort the boundaries, return the max area pin boundary
pin_boundaries.sort(cmpBoundaryAreas,reverse=True)
pin_boundary=pin_boundaries[0]

View File

@ -1,12 +1,20 @@
import os
import gdsMill
import tech
import math
import globals
from vector import vector
from pin_layout import pin_layout
OPTS = globals.OPTS
def ceil(decimal):
"""
Performs a ceiling function on the decimal place specified by the DRC grid.
"""
grid = tech.drc["grid"]
return math.ceil(decimal * 1 / grid) / (1 / grid)
def round_to_grid(number):
"""
Rounds an arbitrary number to the grid.