aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for ECP5 architectureSergeyDegtyar2019-09-0340-0/+3201
|
* Merge branch 'master' of github.com:YosysHQ/yosysEddie Hung2019-09-026-21/+20
|\
| * Merge pull request #1344 from YosysHQ/eddie/ice40_signed_maccEddie Hung2019-09-013-12/+10
| |\ | | | | | | ice40_dsp to allow signed multipliers
| | * Improve tests/ice40/macc.ys for SB_MAC16Eddie Hung2019-08-302-7/+10
| | |
| | * Do not restrict multiplier to unsignedEddie Hung2019-08-301-5/+0
| | |
| * | Merge pull request #1347 from mmicko/fix_select_error_msgClifford Wolf2019-09-011-2/+2
| |\ \ | | | | | | | | Fix select command error msg, fixes issue #1081
| | * | Fix select command error msg, fixes issue #1081Miodrag Milanovic2019-09-011-2/+2
| | | |
| * | | Merge pull request #1346 from mmicko/fix_ecp5_cells_simDavid Shah2019-09-011-6/+7
| |\ \ \ | | |/ / | |/| | Fix TRELLIS_FF simulation model
| | * | Fix TRELLIS_FF simulation modelMiodrag Milanovic2019-08-311-6/+7
| |/ /
| * | ecp5_gsr: Fix typoDavid Shah2019-08-311-1/+1
| | | | | | | | | | | | Signed-off-by: David Shah <dave@ds0.me>
* | | Recognise built-in types (e.g. $_DFF_*)Eddie Hung2019-09-021-3/+4
|/ /
* | Missing dep for test_pmgenEddie Hung2019-08-301-1/+1
| |
* | Merge pull request #1340 from YosysHQ/eddie/abc_no_cleanEddie Hung2019-08-304-35/+35
|\ \ | |/ |/| abc9 to not call "clean" at end of run (often called outside)
| * Nicer formattingEddie Hung2019-08-291-1/+7
| |
| * parse_xaiger() to do "clean -purge"Eddie Hung2019-08-291-1/+1
| |
| * Output has priority over input when stitching in abc9Eddie Hung2019-08-291-13/+10
| |
| * Group abc_* attribute doc with other attributesEddie Hung2019-08-291-17/+17
| |
| * abc9 to not call "clean" at end of run (often called outside)Eddie Hung2019-08-291-3/+0
| |
* | Merge pull request #1310 from SergeyDegtyar/masterEddie Hung2019-08-3037-1/+766
|\ \ | | | | | | Add new tests for ice40 architecture
| * | macc test fixSergeyDegtyar2019-08-301-1/+1
| | |
| * | Fix macc testSergeyDegtyar2019-08-301-1/+1
| | |
| * | div_mod test fixSergeyDegtyar2019-08-301-1/+1
| | |
| * | fix div_mod testSergeyDegtyar2019-08-301-1/+1
| | |
| * | Fix test for counterSergeyDegtyar2019-08-301-1/+1
| | |
| * | Merge branch 'master' into masterSergey2019-08-306-27/+51
| |\ \
| * | | Add new tests.SergeyDegtyar2019-08-3010-0/+200
| | | |
| * | | Remove unnecessary common.v(assertions for testbenches).SergeyDegtyar2019-08-301-47/+0
| | | |
| * | | Remove simulation from run-test.sh (unnecessary paths)SergeyDegtyar2019-08-301-16/+9
| | | |
| * | | Remove simulation from run-test.shSergeyDegtyar2019-08-301-6/+0
| | | |
| * | | Merge pull request #2 from YosysHQ/masterSergey2019-08-2910-127/+341
| |\ \ \ | | | |/ | | |/| Pull from upstream
| * | | Merge pull request #3 from YosysHQ/Sergey/tests_ice40Sergey2019-08-2974-820/+3636
| |\ \ \ | | | | | | | | | | Merge my changes to tests_ice40 branch
| | * | | Comment out *.sh used for testbenches as we have no moreEddie Hung2019-08-281-8/+8
| | | | |
| | * | | Use equiv for memory and dpramEddie Hung2019-08-284-168/+2
| | | | |
| | * | | Use equiv_opt for latchesEddie Hung2019-08-282-58/+10
| | | | |
| | * | | Merge remote-tracking branch 'origin/clifford/async2synclatch' into ↵Eddie Hung2019-08-2867-586/+3616
| | |\ \ \ | | | | | | | | | | | | | | | | | | Sergey/tests_ice40
| * | | | | Add comments for examples from Lattice user guideSergeyDegtyar2019-08-293-0/+9
| |/ / / /
| * | | | Revert "Add tests for ecp5"SergeyDegtyar2019-08-2831-863/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 2270ead09fb4695442c66fe5c06445235f390f2b.
| * | | | Add tests for ecp5SergeyDegtyar2019-08-2831-0/+863
| | | | |
| * | | | Revert "Add tests for ecp5 architecture."SergeyDegtyar2019-08-2731-865/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 134d3fea909bae02f4f814e3d649658502b44b73.
| * | | | Add tests for ecp5 architecture.SergeyDegtyar2019-08-2731-0/+865
| | | | |
| * | | | Add tests for macc and rom;SergeyDegtyar2019-08-274-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test cases from https://www.latticesemi.com/-/media/LatticeSemi/Documents/UserManuals/EI/iCEcube201701UserGuide.ashx?document_id=52071; In both cases synthesized only LUTs and DFFs.
| * | | | Fix pull requestSergeyDegtyar2019-08-232-7/+9
| | | | |
| * | | | Fix run-test.sh; Add new test for dpram.SergeyDegtyar2019-08-234-1/+120
| | | | |
| * | | | Fix path in run-test.shSergeyDegtyar2019-08-231-3/+3
| | | | |
| * | | | Merge pull request #1 from YosysHQ/Sergey/tests_ice40Sergey2019-08-2318-138/+91
| |\ \ \ \ | | | | | | | | | | | | tests_ice40 improvements
| | * | | | Remove adffs_tb.vEddie Hung2019-08-221-75/+0
| | | | | |
| | * | | | WIP for equivalency checking memoriesEddie Hung2019-08-221-1/+13
| | | | | |
| | * | | | Do not print OKAYEddie Hung2019-08-222-4/+0
| | | | | |
| | * | | | SpellingEddie Hung2019-08-221-2/+2
| | | | | |
| | * | | | Fail if iverilog failsEddie Hung2019-08-221-2/+2
| | | | | |
>int oldbit; __asm__ __volatile__( LOCK "btcl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit),"+m" (ADDR) :"Ir" (nr) : "memory"); return oldbit; } #if 0 /* Fool kernel-doc since it doesn't do macros yet */ /** * test_bit - Determine whether a bit is set * @nr: bit number to test * @addr: Address to start counting from */ static int test_bit(int nr, const volatile void * addr); #endif static __always_inline int constant_test_bit(int nr, const volatile unsigned long *addr) { return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0; } static inline int variable_test_bit(int nr, const volatile unsigned long * addr) { int oldbit; __asm__ __volatile__( "btl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit) :"m" (ADDR),"Ir" (nr)); return oldbit; } #define test_bit(nr,addr) \ (__builtin_constant_p(nr) ? \ constant_test_bit((nr),(addr)) : \ variable_test_bit((nr),(addr))) #undef ADDR /** * find_first_zero_bit - find the first zero bit in a memory region * @addr: The address to start the search at * @size: The maximum size to search * * Returns the bit-number of the first zero bit, not the number of the byte * containing a bit. */ static inline int find_first_zero_bit(const unsigned long *addr, unsigned size) { int d0, d1, d2; int res; if (!size) return 0; /* This looks at memory. Mark it volatile to tell gcc not to move it around */ __asm__ __volatile__( "movl $-1,%%eax\n\t" "xorl %%edx,%%edx\n\t" "repe; scasl\n\t" "je 1f\n\t" "xorl -4(%%edi),%%eax\n\t" "subl $4,%%edi\n\t" "bsfl %%eax,%%edx\n" "1:\tsubl %%ebx,%%edi\n\t" "shll $3,%%edi\n\t" "addl %%edi,%%edx" :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); return res; } /** * find_next_zero_bit - find the first zero bit in a memory region * @addr: The address to base the search on * @offset: The bitnumber to start searching at * @size: The maximum size to search */ int find_next_zero_bit(const unsigned long *addr, int size, int offset); /** * __ffs - find first bit in word. * @word: The word to search * * Undefined if no bit exists, so code should check against 0 first. */ static inline unsigned long __ffs(unsigned long word) { __asm__("bsfl %1,%0" :"=r" (word) :"rm" (word)); return word; } /** * find_first_bit - find the first set bit in a memory region * @addr: The address to start the search at * @size: The maximum size to search * * Returns the bit-number of the first set bit, not the number of the byte * containing a bit. */ static inline unsigned find_first_bit(const unsigned long *addr, unsigned size) { unsigned x = 0; while (x < size) { unsigned long val = *addr++; if (val) return __ffs(val) + x; x += (sizeof(*addr)<<3); } return x; } /** * find_next_bit - find the first set bit in a memory region * @addr: The address to base the search on * @offset: The bitnumber to start searching at * @size: The maximum size to search */ int find_next_bit(const unsigned long *addr, int size, int offset); /** * ffz - find first zero in word. * @word: The word to search * * Undefined if no zero exists, so code should check against ~0UL first. */ static inline unsigned long ffz(unsigned long word) { __asm__("bsfl %1,%0" :"=r" (word) :"r" (~word)); return word; } #define fls64(x) generic_fls64(x) #ifdef __KERNEL__ /* * Every architecture must define this function. It's the fastest * way of searching a 140-bit bitmap where the first 100 bits are * unlikely to be set. It's guaranteed that at least one of the 140 * bits is cleared. */ static inline int sched_find_first_bit(const unsigned long *b) { if (unlikely(b[0])) return __ffs(b[0]); if (unlikely(b[1])) return __ffs(b[1]) + 32; if (unlikely(b[2])) return __ffs(b[2]) + 64; if (b[3]) return __ffs(b[3]) + 96; return __ffs(b[4]) + 128; } /** * ffs - find first bit set * @x: the word to search * * This is defined the same way as * the libc and compiler builtin ffs routines, therefore * differs in spirit from the above ffz (man ffs). */ static inline int ffs(int x) { int r; __asm__("bsfl %1,%0\n\t" "jnz 1f\n\t" "movl $-1,%0\n" "1:" : "=r" (r) : "rm" (x)); return r+1; } /** * fls - find last bit set * @x: the word to search * * This is defined the same way as ffs. */ static inline int fls(int x) { int r; __asm__("bsrl %1,%0\n\t" "jnz 1f\n\t" "movl $-1,%0\n" "1:" : "=r" (r) : "rm" (x)); return r+1; } /** * hweightN - returns the hamming weight of a N-bit word * @x: the word to weigh * * The Hamming Weight of a number is the total number of bits set in it. */ #define hweight32(x) generic_hweight32(x) #define hweight16(x) generic_hweight16(x) #define hweight8(x) generic_hweight8(x) #endif /* __KERNEL__ */ #ifdef __KERNEL__ #define ext2_set_bit(nr,addr) \ __test_and_set_bit((nr),(unsigned long*)addr) #define ext2_set_bit_atomic(lock,nr,addr) \ test_and_set_bit((nr),(unsigned long*)addr) #define ext2_clear_bit(nr, addr) \ __test_and_clear_bit((nr),(unsigned long*)addr) #define ext2_clear_bit_atomic(lock,nr, addr) \ test_and_clear_bit((nr),(unsigned long*)addr) #define ext2_test_bit(nr, addr) test_bit((nr),(unsigned long*)addr) #define ext2_find_first_zero_bit(addr, size) \ find_first_zero_bit((unsigned long*)addr, size) #define ext2_find_next_zero_bit(addr, size, off) \ find_next_zero_bit((unsigned long*)addr, size, off) /* Bitmap functions for the minix filesystem. */ #define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,(void*)addr) #define minix_set_bit(nr,addr) __set_bit(nr,(void*)addr) #define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,(void*)addr) #define minix_test_bit(nr,addr) test_bit(nr,(void*)addr) #define minix_find_first_zero_bit(addr,size) \ find_first_zero_bit((void*)addr,size) #endif /* __KERNEL__ */ #endif /* _I386_BITOPS_H */