예제 #1
0
파일: serializer.py 프로젝트: Ben-401/hwt
    def Entity(cls, ent: Entity, ctx: SerializerCtx):
        """
        Entity is just forward declaration of Architecture, it is not used
        in most HDL languages as there is no recursion in hierarchy
        """

        ent.name = ctx.scope.checkedName(ent.name, ent, isGlobal=True)
        return ""
예제 #2
0
파일: serializer.py 프로젝트: mgielda/hwt
    def Entity(cls, ent: Entity, ctx: HwtSerializerCtx):
        """
        Entity is just forward declaration of Architecture, it is not used
        in most HDL languages as there is no recursion in hierarchy
        """

        cls.Entity_prepare(ent, ctx, serialize=False)
        ent.name = ctx.scope.checkedName(ent.name, ent, isGlobal=True)
        ports = list(
            map(lambda p: (p.name, cls.HdlType(p._dtype, ctx)), ent.ports))
        return unitHeadTmpl.render(
            name=ent.name,
            ports=ports,
        )