Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
983fb16
update Grupo
Aug 17, 2022
d712372
update Grupo
Aug 17, 2022
8b90006
update Grupo
Aug 17, 2022
415853d
json
Aug 29, 2022
0826a8f
user 2 Erik
eriksoaress Aug 29, 2022
75a660e
Nome Matheus
C0D8 Aug 29, 2022
1952c87
Merge branch 'main' of https://github.com/Eduardosmb/bits-e-proc-proj…
C0D8 Aug 29, 2022
fe1bd03
Adicionando Erik ao arquivo
eriksoaress Aug 29, 2022
f8ea35d
Adicionando nome
GustavoAntony Aug 29, 2022
08cc1b6
Merge branch 'main' into Erik
Eduardosmb Aug 29, 2022
5ea979c
Testando Pull request
C0D8 Aug 29, 2022
546525f
Merge branch 'gustavoa9' of https://github.com/Eduardosmb/bits-e-proc…
GustavoAntony Aug 29, 2022
b298770
Add nome
GustavoAntony Aug 29, 2022
11abcd5
Merge branch 'main' into gustavoa9
GustavoAntony Aug 29, 2022
697481f
Merge pull request #2 from Eduardosmb/gustavoa9
GustavoAntony Aug 29, 2022
a138cc3
Adicionando MARCELO ao arquivo
Sep 5, 2022
62ee98e
Merge branch 'Insper:main' into gustavoa9
GustavoAntony Sep 5, 2022
d3f6e39
Merge pull request #3 from Eduardosmb/marcelo
Eduardosmb Sep 5, 2022
2e6ef5a
Merge branch 'Insper:main' into gustavoa9
GustavoAntony Sep 5, 2022
a4387ca
Merge pull request #4 from Eduardosmb/gustavoa9
GustavoAntony Sep 5, 2022
53df998
Merge branch 'main' into Erik
Eduardosmb Sep 5, 2022
1b9df43
Merge branch 'main' into Matheus
Eduardosmb Sep 5, 2022
e927b15
Merge pull request #5 from Eduardosmb/Matheus
Eduardosmb Sep 5, 2022
dd250c9
Merge branch 'main' into Erik
Eduardosmb Sep 5, 2022
a9fb309
Merge pull request #7 from Eduardosmb/Erik
Eduardosmb Sep 5, 2022
5828c0a
and6
marchettomarcelo Sep 5, 2022
1f58a2b
teste do orNway passando
marchettomarcelo Sep 9, 2022
d6f0467
tirandos os testes errados
marchettomarcelo Sep 9, 2022
dfcedc9
test mux4way passando
marchettomarcelo Sep 9, 2022
21955b4
nome certo do teste
marchettomarcelo Sep 9, 2022
8ec3b8a
Merge pull request #21 from Eduardosmb/mux4way
Eduardosmb Sep 10, 2022
812c341
Merge branch 'main' into orNway
Eduardosmb Sep 10, 2022
3cae0ff
Merge pull request #20 from Eduardosmb/orNway
Eduardosmb Sep 10, 2022
35da092
Merge pull request #10 from Eduardosmb/and16
Eduardosmb Sep 10, 2022
a40b2d6
deMux4way - Erik
eriksoaress Sep 11, 2022
c42226c
barrelShifter - Erik
eriksoaress Sep 11, 2022
3b1151f
deMux4way
eriksoaress Sep 11, 2022
7f61721
barrelShifter
eriksoaress Sep 11, 2022
329a31e
barrelShifter
eriksoaress Sep 11, 2022
5be69b3
deMux2way
GustavoAntony Sep 11, 2022
d463565
Or8way
GustavoAntony Sep 11, 2022
1180b4a
Merge pull request #28 from Eduardosmb/Or8way
Eduardosmb Sep 11, 2022
b601181
Merge pull request #27 from Eduardosmb/deMux2way
Eduardosmb Sep 11, 2022
3cc77cf
Merge branch 'main' into barrelshifter
Eduardosmb Sep 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ jobs:
pip install -r requirements.txt

# ------------- Tests ----------------
- name: test and16

- name: test barrelShifter
run: |
pytest -k barrelShifter

- name: test orNway
run: |
pytest hw/test_components.py -k and16
pytest hw/test_components.py -k orNway

- name: test mux4way
run: |
pytest -k test_mux4way -v


2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ htmlcov
*.v
.direnv/
*.ini
env
.env
5 changes: 4 additions & 1 deletion GRUPO.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Nome-Grupo: "Macarrao"
{
Nome-Grupo: "criado"
}

26 changes: 26 additions & 0 deletions INTEGRANTES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- user: 1
name: Eduardo Schneider Monteiro de Barros
git-username: eduardosmb
email: eduardosmb@al.insper.edu

- user: 2
name: Erik Leonardo Soares de Oliveira
git-username: eriksoaress
email: eriklso@al.insper.edu.br

-user: 3
name: Gustavo Antony de Assis
git-username: GustavoAntony
email: gustavoa9@al.insper.edu


- user: 4
name: Matheus Aguiar de Jesus
git-username: c0d8
email: matheusaj@al.insper.edu

- user: 5
name: Marcelo Vampré Ferreira Marchetto
git-username: marchettomarcelo
email: marcelovfm@al.insper.edu.br

46 changes: 35 additions & 11 deletions hw/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ def and16(a, b, q):

and bit a bit entre a e b
"""
foo = Signal(0)

@always_comb
def comb():
q.next = foo
q.next = a and b

return comb

Expand All @@ -32,7 +31,7 @@ def or8way(a, b, c, d, e, f, g, h, q):

@always_comb
def comb():
q.next = foo
q.next = a or b or c or d or e or f or g or h

return comb

Expand All @@ -49,7 +48,7 @@ def orNway(a, q):

@always_comb
def comb():
q.next = foo
q.next = a[0] or a[1]

return comb

Expand All @@ -72,8 +71,10 @@ def barrelShifter(a, dir, size, q):

@always_comb
def comb():
q.next = foo

if dir == 0:
q.next = a >> size
else:
q.next = a << size
return comb


Expand All @@ -85,8 +86,7 @@ def mux2way(q, a, b, sel):
b: 16 bits
sel: 2 bits

Mux entre a e b, sel é o seletor
"""
Mux entre a e b, sel é o seletor"""
foo = Signal(intbv(0))

@always_comb
Expand All @@ -112,7 +112,21 @@ def mux4way(q, a, b, c, d, sel):

@always_comb
def comb():
q.next = foo
sel2= str(sel)
print(sel2)
if sel2 == "0":
q.next = a

if sel2 == "1":
q.next = b

if sel2 == "2":
q.next = c

if sel2 == "3":
q.next = d



return comb

Expand Down Expand Up @@ -150,7 +164,12 @@ def deMux2way(a, q0, q1, sel):

@always_comb
def comb():
q0.next = foo
lista_entradas = [q0,q1]
for num in range(0, len(lista_entradas)):
if num == sel:
lista_entradas[num].next = a
else:
lista_entradas[num].next = 0

return comb

Expand All @@ -167,7 +186,12 @@ def deMux4way(a, q0, q1, q2, q3, sel):

@always_comb
def comb():
q0.next = foo
saidas = [q0, q1, q2, q3]
for index in range(0, len(saidas)):
if index == sel:
saidas[index].next = a
else:
saidas[index].next = 0

return comb

Expand Down