mirror of https://github.com/VLSIDA/OpenRAM.git
Rewrite CONTRIBUTING.md to add changes relative to dev. Add small changes from orbe7947.
This commit is contained in:
parent
18e748f3c0
commit
e3a6c1ac6b
|
|
@ -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
|
if you previously added the one with the git@github that required
|
||||||
authentication.
|
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:
|
work on its own branch:
|
||||||
```
|
```
|
||||||
git checkout -b useful-branch-name
|
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 branch useful-branch-name
|
||||||
git checkout 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>
|
<edit files>
|
||||||
|
git add <new files>
|
||||||
git commit -m "Useful comment" <files changed>
|
git commit -m "Useful comment" <files changed>
|
||||||
```
|
```
|
||||||
OR (sparingly, to commit all changes):
|
OR (sparingly, to commit all changes):
|
||||||
```
|
```
|
||||||
git status
|
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"
|
git commit -a -m "Useful comment"
|
||||||
```
|
```
|
||||||
Run the unit tests entirely. Fix all bugs.
|
Run the unit tests entirely. Fix all bugs.
|
||||||
|
|
||||||
7. After you are done (or while you are editing and you see changes in
|
8. 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
|
MY dev branch) make sure you have the most recent from MY dev
|
||||||
and merge any changes. Pull the updated copy from MY master branch in
|
and merge any changes. Pull the updated copy from MY master dev in
|
||||||
MY repository:
|
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
|
git push -u origin useful-branch-name
|
||||||
```
|
```
|
||||||
Remember origin is your copy on github and useful-branch-name is the
|
Remember origin is your copy on github and useful-branch-name is the
|
||||||
branch that you made to contain all your changes.
|
branch that you made to contain all your changes.
|
||||||
The -u flag links this branch with the remote one, so that in the
|
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.
|
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
|
This will have you fill in a form for the contribution that gets sent
|
||||||
to me.
|
to me.
|
||||||
|
|
||||||
10. I will review the request and may have you fix stuff if the tests
|
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 master from other
|
don't pass, you didn't merge all my changes in dev from other
|
||||||
contributions, or your style of code is bad.
|
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
|
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.
|
to add lots of pull requests.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import design
|
import design
|
||||||
import debug
|
import debug
|
||||||
|
import utils
|
||||||
from tech import drc
|
from tech import drc
|
||||||
from vector import vector
|
from vector import vector
|
||||||
|
|
||||||
|
|
@ -53,15 +54,15 @@ class contact(design.design):
|
||||||
# FIME break this up
|
# FIME break this up
|
||||||
self.first_layer_horizontal_enclosure = max((drc["minwidth_{0}".format(self.first_layer_name)] - self.contact_array_width) / 2,
|
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)])
|
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.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,
|
/ (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["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)])
|
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,
|
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)])
|
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.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,
|
/ (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["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)])
|
drc["{0}_extend_{1}".format(self.second_layer_name, self.via_layer_name)])
|
||||||
# offset for the via array
|
# offset for the via array
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class Gds2writer:
|
||||||
if (len(self.layoutObject.info["libraryName"]) % 2 != 0):
|
if (len(self.layoutObject.info["libraryName"]) % 2 != 0):
|
||||||
libraryName = self.layoutObject.info["libraryName"] + "\0"
|
libraryName = self.layoutObject.info["libraryName"] + "\0"
|
||||||
else:
|
else:
|
||||||
libraryName = self.layoutObject.info["libraryName"] + "\0"
|
libraryName = self.layoutObject.info["libraryName"]
|
||||||
self.writeRecord(idBits+libraryName)
|
self.writeRecord(idBits+libraryName)
|
||||||
## reference libraries
|
## reference libraries
|
||||||
if("referenceLibraries" in self.layoutObject.info):
|
if("referenceLibraries" in self.layoutObject.info):
|
||||||
|
|
|
||||||
|
|
@ -696,6 +696,9 @@ class VlsiLayout:
|
||||||
"""
|
"""
|
||||||
pin_boundaries=self.getAllPinShapesInStructureList(coordinate, layer)
|
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
|
# sort the boundaries, return the max area pin boundary
|
||||||
pin_boundaries.sort(cmpBoundaryAreas,reverse=True)
|
pin_boundaries.sort(cmpBoundaryAreas,reverse=True)
|
||||||
pin_boundary=pin_boundaries[0]
|
pin_boundary=pin_boundaries[0]
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,20 @@
|
||||||
import os
|
import os
|
||||||
import gdsMill
|
import gdsMill
|
||||||
import tech
|
import tech
|
||||||
|
import math
|
||||||
import globals
|
import globals
|
||||||
from vector import vector
|
from vector import vector
|
||||||
from pin_layout import pin_layout
|
from pin_layout import pin_layout
|
||||||
|
|
||||||
OPTS = globals.OPTS
|
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):
|
def round_to_grid(number):
|
||||||
"""
|
"""
|
||||||
Rounds an arbitrary number to the grid.
|
Rounds an arbitrary number to the grid.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue