Skip to content

Instantly share code, notes, and snippets.

View gvillalta99's full-sized avatar
💜
Cool

gvillalta99 gvillalta99

💜
Cool
View GitHub Profile
@gvillalta99
gvillalta99 / Makefile
Created April 30, 2014 19:51
TDD on VHDL
#Project file
PRJ=counter_tb.prj
#Compiled executable
EXE=counter_tb.exe
#TCL commands that will run in the simulator
CMD=isim.cmd
#Temporary Command file
CMDTMP=isim.tmp.cmd
#Waveform DataBase from simulation
WDB=isim.wdb
export PATH=$PATH:$XILINX_INSTALLATION/$XILINX_VERSION/ISE_DS/ISE/bin/lin64
#XILINX_INSTALLATION is the path where you installed the Xilinx ISE Design Suite with xinstall
#XILINX_VERSION is the version of Xilinx ISE Design Suite installed
export LM_LICENSE_FILE=~/Download/XILINX_LICENCE.dat
Figura 1
_____
____/-----\______
| __ __ | 1m
|_/ \_______/ \| <---------> Pista
_____\__/_______\__/_________________________
T D | | |
P1 M P2
Legenda
Figura 2
Vcc _____ +---5khz--------------+
_____ | | ffd | | _____ _____ | ______
P1 --------| | +--|D | +-| | | con | | | com |
| AND |-----|> Q|--------| AND |----|> |--|--|X |
M --------|_____| | | /|\ |_____| | | | | |
| _____ |__R__| | ____ |__R__| +-o|> X<Y|--MF
+--|>--| | | | P1---| | | | |
| AND |--------+ | | AND|----+--------|R |
P2 --------|_____| | M----|____| | |
#include <stdio.h>
#define TAMANHO 128
long converteBinario(char[]);
int tamanho(char[]);
int potencia2(int);
int main(int argc, char *argv[]){
char input1[TAMANHO];
char input2[TAMANHO];
#include <stdio.h>
#include <stdlib.h>
#define TAMANHO 128
int converteBinarioDecimal(char[]);
char* converteDecimalTernario(int);
char* inverteVetor(char * vetor);
int tamanho(char[]);
int potencia2(int);
@gvillalta99
gvillalta99 / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@gvillalta99
gvillalta99 / makefile
Created April 29, 2015 22:38
Make *.pdf from *.tex
PDF=pdflatex
IDX=makeindex
BIB=bibtex
READ=evince
MAKE=make clean-clutter
%.pdf: %.tex %.idx
@echo 'Building $@ dependencies $?'
$(IDX) $(@:.pdf=.idx)
$(BIB) $(@:.pdf= )
# Testing Ruby's method visibility with Modules
module A
def public_method
puts :public_method
end
protected
def protected_method
puts :protected_method