Commit 608c2af0 authored by Michael Büsch's avatar Michael Büsch

cython: Add central cython support definitions

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent c3b414f4
......@@ -19,6 +19,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.cpuspecs import * #+cimport
......
......@@ -19,6 +19,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.sources import AwlSource
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
import sys
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.cpuconfig import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.enumeration import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.cpuconfig import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.awloptimizer.base import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.awloptimizer.base import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.enumeration import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
from awlsim.common.cython_support cimport *
from awlsim.core.cpu cimport *
cdef class S7CPUSpecs(object):
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
# Get all stdint types.
from libc.stdint cimport *
# Boolean type. The values 0 and 1 can be used.
ctypedef bint _Bool
# Extended boolean type for use as return type from
# functions that can raise exceptions.
# The values 0 and 1 can be used.
# An exception is encoded as special value ExBool_val.
ctypedef signed int ExBool_t
cdef enum: ExBool_val = -1
# -*- coding: utf-8 -*-
#
# AWL simulator - Cython support
#
# Copyright 2018 Michael Buesch <m@bues.ch>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
from awlsim.common.cython_support cimport *
cdef uint16_t swapEndianWord(uint16_t word)
cdef uint32_t swapEndianDWord(uint32_t dword)
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
import gc as garbageCollector
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.enumeration import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.xmlfactory import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
......
from awlsim.common.cython_support cimport *
cdef class _MONOTONIC_RAW_factory(object):
cdef public object __id_CLOCK_MONOTONIC_RAW
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.xmlfactory import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.cpuspecs import * #+cimport
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.xmlfactory import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
import distutils.spawn
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.enumeration import *
......
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from binascii import crc32
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.enumeration import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.util import *
......
from awlsim.common.cython_support cimport *
from awlsim.core.lstack cimport *
cdef class Block(object):
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.refmanager import *
......
from awlsim.common.cython_support cimport *
from awlsim.core.cpu cimport *
from awlsim.core.blocks cimport *
from awlsim.core.datablocks cimport *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
from awlsim.common.cython_support cimport *
from awlsim.core.cpu cimport *
cdef class Counter(object):
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
from awlsim.common.cython_support cimport *
from awlsim.core.statusword cimport *
from awlsim.core.callstack cimport *
from awlsim.core.lstack cimport *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
import time
......
from awlsim.common.cython_support cimport *
from awlsim.core.blocks cimport *
from awlsim.core.datastructure cimport *
from awlsim.core.offset cimport *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.blockinfo import *
......
from awlsim.common.cython_support cimport *
from awlsim.core.memory cimport *
from awlsim.core.offset cimport *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.datatypehelpers import * #+cimport
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.datatypehelpers import * #+cimport
......
from awlsim.common.cython_support cimport *
from awlsim.core.main cimport *
from awlsim.core.cpu cimport *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy
from awlsim.common.compat import *
from awlsim.common.exceptions import *
......
......@@ -20,6 +20,7 @@
#
from __future__ import division, absolute_import, print_function, unicode_literals
#from awlsim.common.cython_support cimport * #@cy